using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
Console.WriteLine(Regex.IsMatch("abc123", "^.[pr]|[A-Za-z]$"));
Console.WriteLine(Regex.IsMatch("abc12x", "^.[pr]|[A-Za-z]$"));
Console.WriteLine(Regex.IsMatch("apc123", "^.[pr]|[A-Za-z]$"));
Console.WriteLine(Regex.IsMatch("arc123", "^.[pr]|[A-Za-z]$"));
Console.WriteLine(Regex.IsMatch("", "^.[pr]|[A-Za-z]$"));
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyAgU3lzdGVtLlRleHQuUmVndWxhckV4cHJlc3Npb25zOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJewoJCUNvbnNvbGUuV3JpdGVMaW5lKFJlZ2V4LklzTWF0Y2goImFiYzEyMyIsICJeLltwcl18W0EtWmEtel0kIikpOwogICAgCUNvbnNvbGUuV3JpdGVMaW5lKFJlZ2V4LklzTWF0Y2goImFiYzEyeCIsICJeLltwcl18W0EtWmEtel0kIikpOwogICAgCUNvbnNvbGUuV3JpdGVMaW5lKFJlZ2V4LklzTWF0Y2goImFwYzEyMyIsICJeLltwcl18W0EtWmEtel0kIikpOwogICAgCUNvbnNvbGUuV3JpdGVMaW5lKFJlZ2V4LklzTWF0Y2goImFyYzEyMyIsICJeLltwcl18W0EtWmEtel0kIikpOwogICAgCUNvbnNvbGUuV3JpdGVMaW5lKFJlZ2V4LklzTWF0Y2goIiIsICJeLltwcl18W0EtWmEtel0kIikpOwoJfQp9