import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String text1 = scan.nextLine(); String text2 = scan.nextLine(); boolean isOK = true; for (String var : text1.split("[.]")) { if (!text2.contains(var)) { isOK = false; break; } } System.out.println(isOK); } }