import java.util.*; import java.io.*; public class Crypto { Scanner in = new Scanner(System.in); public static void main(String[] args) { new Crypto().solve(); } public void solve() { //in = new Scanner("2\nHPC PJVYMIY\nBLMRGJIASOPZEFDCKWYHUNXQTV\nFDY GAI BG UKMY\nKIMHOTSQYRLCUZPAGWJNBVDXEF"); int num_cases = Integer.parseInt(in.nextLine()); for(int case_num = 1; case_num <= num_cases; case_num++) { String encoded = in.nextLine(); String key = in.nextLine(); /*// map each code char to the decode char // so if a coded A means G, put G in the first element of keys char[] keys = new char[1000]; for(int i=0; i