// Arup Guha
// 8/30/2026
// Solution to Fall 2026 COP 3330 Program #2C: Seating Chart

import java.util.*;

public class seating {

	public static void main(String[] args) {
	
		// Get user input.
		Scanner stdin = new Scanner(System.in);
		System.out.println("How many rows in the concert venue?");
		int numRows = stdin.nextInt();
		System.out.println("How many columns in the concert venue?");
		int numCols = stdin.nextInt();
		System.out.println("What percentage of the tickets are already sold?");
		int percSold = stdin.nextInt();
		
		// Our random object.
		Random rndObj = new Random();
		
		// Go through each row.
		for (int i=0; i<numRows; i++) {
		
			
			// And each column.
			for (int j=0; j<numCols; j++) {
			
				// Random integer 0 to 99.
				int tmp = rndObj.nextInt(100);
				
				// We count this seat as sold.
				if (tmp < percSold)
					System.out.print("X");
					
				// If it's not sold we draw an O.
				else
					System.out.print("O");
				
				// This is for the aisle every 20 columns.
				if (j%20 == 19)
					System.out.print(" ");
			}
			
			// End of row.
			System.out.println();
			
			// Blank row after each group of 5.
			if (i%5 == 4)
				System.out.println();
		}
	}
}