let n = readLine()!.split(separator: " ").map{Int($0)!} var a = readLine()!.split(separator: " ").map{Int($0)!} a += [a[0]] for i in 1..