enum M{M;System z;{try{z.out.print("0 21 50 29!18 3 50 29!!30 40 10 20".split("!")[z.in.read()%4]);}catch(Exception e){}}}