program main
implicit None
	character::s*3,t,k*2
	
	read *,s
	
	if(s(3:3) /= " ")then
		t = s(3:3)
		s(3:3) = s(1:1)
		s(1:1) = t
		print 101,s
		else
		k = s(1:2)
		print 101,k
	endif
	
101 format(a)
end program main