t=1 System.in.eachLine{s->t.times{s=s.tr'A-Za-z','B-ZAb-za'} t-1&&print(s.tr('!?','?!')) t=s as int}