import java.io.*;
public class Main{
public static void main(String args[])throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
int n = Integer.parseInt(s);
int[] a = new int[n];
for(int i=0;i<n;i++){
s = br.readLine();
String[] c = s.split(" ");
for(int j=0;j<n;j++){
if(c[j]=="A")
a[j] = 5;
if(c[j]=="B")
a[j] = 6;
if(c[j]=="+")
a[j] = 1;
if(c[j]=="-")
a[j] = -1;
}
for(int j=0;j<n;j++)
System.out.print(a[j] + " ");
System.out.println();
}
}
}
package mine.net;
import java.io.*;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
int n = s.length();//Integer.parseInt(s);
int[] a = new int[n];
for (int i = 0; i < n; i++) {
//s = br.readLine();
String[] c = s.split("");
for (int j = 0; j < n; j++) {
if (c[j] == "A")
a[j] = 5;
if (c[j] == "B")
a[j] = 6;
if (c[j] == "+")
a[j] = 1;
if (c[j] == "-")
a[j] = -1;
}
for (int j = 0; j < n; j++)
System.out.print(a[j] + " ");
System.out.println();
}
}
}
package mine.net;
import java.io.*;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
int n = s.length();//Integer.parseInt(s);
int[] a = new int[n];
for (int i = 0; i < n; i++) {
//s = br.readLine();
String[] c = s.split("");
for (int j = 0; j < n; j++) {
if (c[j].equals("A") )
a[j] = 5;
if (c[j] .equals("B"))
a[j] = 6;
if (c[j] .equals("+"))
a[j] = 1;
if (c[j] .equals("-"))
a[j] = -1;
}
for (int j = 0; j < n; j++)
System.out.print(a[j] + " ");
System.out.println();
}
}
}
//判断是内容,不能有==
import java.io.*;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
int num=keyStoInt(s);
System.out.println(num);
/*int n = s.length();//Integer.parseInt(s);
int[] a = new int[n];
for (int i = 0; i < n; i++) {
//s = br.readLine();
String[] c = s.split("");
for (int j = 0; j < n; j++) {
if (c[j].equals("A") )
a[j] = 5;
if (c[j] .equals("B"))
a[j] = 6;
if (c[j] .equals("+"))
a[j] = 1;
if (c[j] .equals("-"))
a[j] = -1;
}
for (int j = 0; j < n; j++)
System.out.print(a[j] + " ");
System.out.println();
}*/
}
public static int keyStoInt(String keyIn){
int keyOut=0;
//
for(int i=0;i if(keyIn.charAt(i)>=97)
keyOut=keyOut*10+(keyIn.charAt(i)-'a'+10);
else if(keyIn.charAt(i)>=65)
keyOut=keyOut*10+(keyIn.charAt(i)-'A'+10);
else if(keyIn.charAt(i)>=47)
keyOut=keyOut*10+(keyIn.charAt(i)-'0');
else ;
//其他的业务你自己细化
}
return keyOut;
}
}