using System; class I { static void Main() => Console.WriteLine(Solve()); static object Solve() { var n = int.Parse(Console.ReadLine()); var s = Console.ReadLine(); if (s == "Q") return s; return -1; } }