A bookkeeping export writes one ledger record per line in comma-separated form. Fields are separated by commas. A field may be wrapped in double quotes "; inside a quoted field, commas are literal text (not separators), and a pair of double quotes "" represents a single literal double-quote character. Every quoted field is fully wrapped (it starts and ends with a quote) and every quote in the input is either a wrapping quote or part of a "" pair inside a quoted field. Each record is on its own physical line (no field ever contains a line break).
For every record, report how many fields it contains.
Input format
Line 1: an integer n, the number of records.
Next n lines: one CSV record each. Every record line is non-empty.
Output format
Print n lines; line i is the number of fields in record i.
Constraints
- 1 <= n <= 50
- 1 <= length of each record line <= 300
- Fields are separated by commas; quoted fields follow the rules above.