def extract_arguments(fh):
    N = int(fh.readline().strip())
    cases = []
    for _ in range(N):
        W, H = map(int, fh.readline().strip().split())
        area = []
        for _ in range(H):
            row = list(map(int, fh.readline().strip().split()))
            area.append(row)
        cases.append((W, H, area))
    return cases

# if __name__ == "__main__":
#     input_path = sys.argv[1]
#     with open(input_path, 'r') as fh:
#         cases = extract_arguments(fh)
#         for case in cases:
#             process_case(*case)