import java.util.regex.Matcher; 
import java.util.regex.Pattern; 

public class JI9053868 {

	private static final String ALPHA_NUMERIC_STRING = "ABC DEFGH IJKLM NOPQR STUVWXY Z 01 234 567 89"; 
	public static void main(String[] args) { 

		String dummyVar = ""; 

		Pattern p = Pattern.compile("HUNG.* .* PHONE|PRICE.*"); 
		Matcher m = p.matcher(randomAlphaNumeric(403403)); 
		System.out.println("looking for pattern : "+p); 
		boolean match = m.find(0); 
		System.out.println("done : match found : "+match); 

	} 
	public static String randomAlphaNumeric(int count) { 
		StringBuilder builder = new StringBuilder(); 
		while (count-- != 0) { 
			int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length()); 
			builder.append(ALPHA_NUMERIC_STRING.charAt(character)); 
			if(count % 1000 == 0){ 
				builder.append("HUNG"); 
			} 
		} 
		return builder.toString(); 
	} 

}
