import java.io.*; public class Magic{ static final int maxsize = 50; public static void main (String [] args) throws IOException{ int i, j, k, l, n, key;
Check out the Scanner class.