char*s=" wohrouivixeviginenlewe",a[9];i;main(j){for(;gets(a);puts(j>2?strcat(a,"fth"+(j-4&&j-11)):"First\0 Second\0Third"+j*7))i=a[3],a[3]=0,j=(strstr(s,a+1)-s)/2,a[3]=i,a[j-4?j-7?j-8?j-11?9:4:3:4:2]=0;}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).