import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import Data.List


main = do
    [rows, columns, illegalDistance] <- fmap (fmap read . words) getLine
    let rowColumnList = [1..rows] >>= \row -> [1..columns] >>= \column -> return (row, column)
    let initialMap = Map.fromList $ zip rowColumnList (repeat $ Set.fromList "BGRY")
    let result = foldl (\m (row, column) -> removeIllegal illegalDistance row column . pickFirstAvail row column $ m) initialMap rowColumnList
    mapM_ (printRow columns result) [1..rows]

printRow columns m r = putStrLn (fmap (\i -> onlyItem $ m Map.! i) . zip (repeat r) $ [1..columns])

firstAvail = Set.fromList . take 1 . Set.toAscList

onlyItem = head . Set.toList

pickFirstAvail row column = Map.update (Just . firstAvail) (row, column)

removeIllegal illegalDistance row column m = let item = onlyItem (m Map.! (row, column)) in
    foldl (\m' illegalCell -> Map.update (Just . Set.delete item) illegalCell m') m (getIllegalCells illegalDistance row column)

getIllegalCells illegalDistance row column = fmap (\(illegalRowDistance, illegalColumnDistance) -> (row + illegalRowDistance, column + illegalColumnDistance)) . sort $ zip [illegalDistance, illegalDistance - 1..0] [0..illegalDistance] ++ zip [0, -1..negate illegalDistance] [illegalDistance, illegalDistance -1..0] ++ zip [illegalDistance, illegalDistance -1..0] [0, -1..negate illegalDistance] ++ zip [0, -1..negate illegalDistance] [negate illegalDistance, negate illegalDistance + 1..0]