using System;
public class Test
{
public static void Main()
{
int n;
while ((n = int.Parse(Console.ReadLine()))!=42)
Console.WriteLine(n);
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCWludCBuOwoJCXdoaWxlICgobiA9IGludC5QYXJzZShDb25zb2xlLlJlYWRMaW5lKCkpKSE9NDIpCgkJCUNvbnNvbGUuV3JpdGVMaW5lKG4pOwoJfQp9Cg==