A Calvinball game has n players. Some pairs dislike each other (symmetrically). Split everyone into teams so no disliking pair shares a team, using as few teams as possible. Output any optimal division.
Line 1: n and m, the player count and dislike-pair count. Next m lines: distinct players ai and bi who dislike each other (1≤ai,bi≤n).
Line 1: team count t. Next t lines list players on each team in any order. Teams and players within a team may appear in any order.
Batch data may be judged separately; the sample above is a normal stdin/stdout case.