//import java.util.*;
//
//public class Main {
// public static void main(String[] args) {
// Scanner t = new Scanner(System.in);
//
// while(true) {
// char x = t.next().charAt(0);
// System.out.println(x);
// if(x == 'q') {
// break;
// }
// }
// }
//} //원하는 문자가 입력될 때까지 반복 출력하기
//import java.util.*;
//
//public class Main {
// public static void main(String[] args) {
// Scanner t = new Scanner(System.in);
//
// int n = t.nextInt();
// int cnt = 0;
//
// while(n > 0) {
// n = n / 10;
// cnt++;
// }
// System.out.println(cnt);
// }
//} //1278 : 자릿수 계산
/* n sum
* 432 0
* 43 2
* 4 5
* 0 9
*/
//import java.util.*;
//
//public class Main {
// public static void main(String[] args) {
// Scanner t = new Scanner(System.in);
//
// int n = t.nextInt();
// int sum = 0;
//
// while (n > 0) {
// sum += n % 10;
// n = n / 10;
// }
// System.out.println(sum);
// }
//} //4041 : 숫자 다루기
///*
//for(;;)
//{
//
//}
//
//while()
//{
//
//}
//
//do {
//
//}while();
//기초4-2. 중첩 반복문
//import java.util.*;
//
//public class Main {
// public static void main(String[] args) {
// Scanner t = new Scanner(System.in);
//
// int n = t.nextInt();
// for(int i=0;i<n;i++) {
// for(int j=0;j<n;j++) {
// if() System.out.print("*");
// else System.out.print(" ");
// }
// for(int j=0;j<n;j++) {
// System.out.print("!");
// }
// System.out.println();
// }
// }
//}
//import java.util.*;
//
//public class Main {
// public static void main(String[] args) {
// Scanner t = new Scanner(System.in);
//
// int n = t.nextInt();
//
// for(int i = 0; i < n; i++) {
// for(int j = 0; j < n; j++) {
// System.out.print("*");
// }
// System.out.println();
// }
// }
//} //사각형 출력하기 1
//import java.util.*;
//
//public class Main {
// public static void main(String[] args)
// {
// Scanner t = new Scanner(System.in);
//
// int n = t.nextInt();
//
// for(int i = 1; i <= n; i++) {
//
// for(int j = 1; j <=n; j++) {
//
// if(i == 1 || i == n) {
// System.out.print("*");
// }
// else {
// System.out.print("*");
// for(int j == 0; j <= n - 2; j++) {
// System.out.print("");
// }
// System.out.print("*");
// }
// System.out.println();
// }
// }
// }
//} //1356 : 사각형 출력하기 2
//import java.util.*;
//
//public class Main {
// public static void main(String[] args) {
// Scanner t = new Scanner(System.in);
//
// int n = t.nextInt();
//
// for(int i = 1; i <= n; i++) {
// for(int j = 1; j <= n; j++) {
// if(i==1||i==n||j == 1 || j == n|| j == i || i+j==n+1 ) {
// System.out.print("*");
// }else {
// System.out.print(" ");
// }
// }
// System.out.println();
// }
// }
//} //1365 : 사각형 출력하기 3
/*
i j
1 9 n
2 8 n-1
3 7 n-2
i+j==n+1
*/