G. A Packing Problem
time limit per test
1.5 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
3 3
4 2 1 2
4 2 2 3
4 2 3 1
4
Output
Assignment
1 2 3 
Input
4 3
4 2 1 2
4 2 2 3
4 2 3 1
4 3 1 2 3
4
Output
Proof
1 1 1 1
1 1 1