import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String num = sc.nextLine(); String beforeUse = sc.nextLine(); String[] afterUse = (sc.nextLine()).split(" "); beforeUse = beforeUse.replace(" ", ""); // 空白を取り除く for (String element : afterUse) { beforeUse = beforeUse.replaceFirst(element, ""); } System.out.println(beforeUse); sc.close(); } }