Guess Your Way Out!

hard
https://codeforces.com/contest/507/problem/C

Input Format

Check Link

Output Format

Check Link

Constraints

Check Link

Example

Input
2 3
Output
2
Previous
Vus The Cossaick And Strings

Related Questions