#1066. 春游

春游

Description

image

Format

Input

image

Output

image

Samples

3 3 
0 2 1
3
3 5 
0 0 0 0 0
1 2