import java.util.*; public class Main { public static void main(String[] args) { Scanner scn=new Scanner(System.in); String str=scn.nextLine(); String arr[]= {"hate","stupid","angry","dirty"},arr2[]= {"love","smart","happy","clean"}; for(int i=0;i<4;i++) str = str.replaceAll(arr[i], arr2[i]); System.out.println(str); } /*題目:[C_ST49-易] 字串取代 作者:1010 時間:西元 2018 年3 月 */ }