A commando is a soldier of an elite light infantry often specializing in amphibious landings, abseiling or parachuting. This time our Commando unit wants to free as many hostages as it could from a hotel in Byteland, This hotel contains 10 identical floors numbered from 1 to 10 each one is a suite of 10 by 10 symmetric square rooms, our unit can move from a room (F, Y, X) to the room right next to it (F, Y, X + 1) or front next to it (F, Y + 1, X) and it can also use the cooling system to move to the room underneath it (F - 1, Y, X).
Knowing that our unit parachuted successfully in room 1-1 in floor 10 with a map of hostages locations try to calculate the maximum possible hostages they could save.
Your program will be tested on one or more test cases. The first line of the input will be a single integer T. Followed by the test cases, each test case contains a number N (1 ≤ N ≤ 1, 000) representing the number of lines that follows. Each line contains 4 space separated integers (1 ≤ F, Y, X, H ≤ 10) means in the floor number F room Y-X there are H hostages.
For each test case, print on a single line, a single number representing the maximum possible hostages that they could save.
## Input
Your program will be tested on one or more test cases. The first line of the input will be a single integer T. Followed by the test cases, each test case contains a number N (1 ≤ N ≤ 1, 000) representing the number of lines that follows. Each line contains 4 space separated integers (1 ≤ F, Y, X, H ≤ 10) means in the floor number F room Y-X there are H hostages.
## Output
For each test case, print on a single line, a single number representing the maximum possible hostages that they could save.
[samples]
**Definitions**
Let $ T \in \mathbb{Z} $ be the number of test cases.
For each test case $ k \in \{1, \dots, T\} $:
- Let $ N_k \in \mathbb{Z} $ denote the number of hostage locations.
- Let $ L_k = \{(f_i, y_i, x_i, h_i) \mid i \in \{1, \dots, N_k\} \} $ be the set of hostage locations, where:
- $ f_i \in \{1, \dots, 10\} $: floor number,
- $ y_i \in \{1, \dots, 10\} $: row coordinate,
- $ x_i \in \{1, \dots, 10\} $: column coordinate,
- $ h_i \in \{1, \dots, 10\} $: number of hostages at $ (f_i, y_i, x_i) $.
The commando starts at position $ (10, 1, 1) $.
**Constraints**
1. $ 1 \le T \le \text{unknown} $ (implied by input format)
2. For each test case:
- $ 1 \le N_k \le 1000 $
- $ 1 \le f_i, y_i, x_i, h_i \le 10 $ for all $ i $
**Objective**
Find the maximum sum of hostages $ \sum h_i $ that can be collected along a path starting at $ (10, 1, 1) $, moving only to adjacent rooms:
- Same floor: $ (f, y, x) \to (f, y, x+1) $ or $ (f, y+1, x) $,
- Down one floor: $ (f, y, x) \to (f-1, y, x) $,
with no upward movement allowed.
Formally, define a directed graph $ G_k = (V_k, E_k) $:
- $ V_k = \{(f, y, x) \mid f,y,x \in \{1,\dots,10\}\} $,
- $ E_k $ contains edges:
- $ (f, y, x) \to (f, y, x+1) $ if $ x < 10 $,
- $ (f, y, x) \to (f, y+1, x) $ if $ y < 10 $,
- $ (f, y, x) \to (f-1, y, x) $ if $ f > 1 $.
Each vertex $ (f, y, x) $ has weight $ w(f, y, x) = \sum \{ h_i \mid (f_i, y_i, x_i) = (f, y, x) \} $.
Compute the maximum weight path from $ (10, 1, 1) $ to any reachable vertex in $ G_k $.
**Output**
For each test case, output the maximum total hostages collectible along such a path.