import java.io.; import java.lang.System.; import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int T;
for (T = sc.nextInt(); T != 0; T--) {
int N;
N = sc.nextInt();
Reader ob = new Reader();
Map<Character, Character> hm= new HashMap<>();
boolean b=false;
for (; N != 0; N--) {
ob.Read();
char c = ob.c;
char p = ob.p;
hm.put(c, p);
b=true;
}
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String userName = br.readLine();
if(b==true){
char[] ch=userName.toCharArray();
for(int i=0,len=ch.length;i<len;i++){
char ch1=ch[i];
if(hm.get(ch1)!=null)
ch[i]=hm.get(ch1);
}
userName=String.valueOf(ch);
}
String W=Real_password(userName);
System.out.println(W);
}
}
static String Real_password(String S)
{
char[] str=S.toCharArray();
int Start=0;
int End=S.length()-1;
while(str[Start]=='0')
Start++;
int pos=S.indexOf('.');
if(pos!=-1)
{
while(str[End]=='0')
End--;
}
if(str[End]=='.')
End--;
S=String.valueOf(str);
return(S.substring(Start,End+1));
}
}
class Reader {
char c, p;
char ch;
public void Read() throws IOException {
c = (char) System.in.read();
ch = (char) System.in.read();
p = (char) System.in.read();
ch = (char) System.in.read();
}
}
Why am i getting NZEC error in this java code , Runs very well on my PC?? PLZ Help