package No400番台; import java.util.Scanner; public class A { public static void main(String[] args) { new A().run(); } void run() { solver(); } void solver() { Scanner sc = new Scanner(System.in); String s = sc.next(); if (s.equals("ham")) { System.out.println(s); } else { s += "ham"; System.out.println(s); } } }