Below is the syntax specification for the txt file: NumberOfColumns NumberOfRows (RowIndex ColumnIndex [F|P|T])+ The RowIndex and ColumnIndex are 1 based, and not Zero-based. Consider the following state: | F P | | F T | | | |T P | | FFF | It would be specified as follows: 10 5 1 2 F 1 5 P 2 2 F 2 7 T 4 1 T 4 9 P 5 3 F 5 4 F 5 5 F