import java.util.*;
public class Solution {

public static void main (String[] args)
{
    int[][] seats = new int[][]  { {2,0,0}, {1,1,1}, {2,2,2}};  //TEST CASE 1 
    int[][] seats = new int[][]  { {1,0}, {2,0}};  //TEST CASE 2
    int[][] seats = new int[][]  { {5}, {10}};  //TEST CASE 3
    int[][] seats = new int[][]  { {1,2,3}, {4,5,6}, {7,8,9} };  //TEST CASE 4
    
    canSeeStage(seats);
}
    
    public static boolean canSeeStage(int[][] seats) {


int rowNumber=0;
int seatNumber=0;
int count=0;
int pos=0;
//int []row;

//int [] frontRow = new int[row.length];

   //the logic below checks each theater row from the front
   //and it gets all the people sitting in that row
   //it does this front => back
   
   //we know it has to make a comparison with the row in front.
   //if there is no height violation, we no longer are concerned about being two rows apart...
   //we can only make a comparison on row two...
   //and we know the front row (relative to current row) data is lost.... unless we keep a copy....

        for (int[] row: seats)  //this will go through each row in the theater
        {
            
            System.out.println("ROW NUMBER IN THEATER: " + rowNumber);

            if (rowNumber>=1)
            {
                for (int m: row)    //for each person in the row...
                {
                    System.out.println("Checking person in " + "(Row:" + rowNumber + "  Seat: " + pos+ " HEIGHT:  " + m+")" + " against person in front: " + seats[rowNumber-1][pos]);
                    //just need to check against row in front and position in front
                    if (m<seats[rowNumber-1][pos])
                    {
                        System.out.println("Person in front is taller: " + seats[rowNumber-1][m]);
                        return false;                        
                    }
                    
                    pos++;
                }
                pos=0;
            }
            
            rowNumber++;
        }
    
        return true;    //all seats can see in front of it  
    }
}