#include <stdio.h> int main(void) { int x; for(; scanf("%d",&x) > 0 && x != 42; printf("%d ", x)); return 0; }