function Main(input){ input = input.trim() input = input.split("\n") for(a = 0;a