#include <stdio.h>
using namespace std;

int main() {
    char a[1000] = { 0 };
    while (fgets(a, sizeof(a), stdin)) {
        for (int i = 0; a[i] != '\0'; i++) {
            if (a[i] == ' ') {
                for (int j = i; a[j] != '\0'; j++) {
                    a[j] = a[j + 1];
                }
            }
        }
        printf("%s", a);
    }
    return 0;
}