rows = int(input('Digit the # of rows: '))
collums = int(input('Digit the # of collums: '))


def tiktaktoe(rows, collums):
    if rows <= 30 and collums <= 108:
        for r in range(1, rows+1):
            if r % 2 != 0:
                for c in range(1, collums+1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end="")
                        else:
                            print('|', end="")
                    else:
                        if c % 2 != 0:
                            print(' ')
                        else:
                            print('|')
            else:
                print('-'*collums)
        return True
    else:
        for r in range(1, rows+1):
            if r % 2 != 0:
                for c in range(1, collums+1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end="")
                        else:
                            print('|', end="")
                    else:
                        if c % 2 != 0:
                            print(' ')
                        else:
                            print('|')
            else:
                print('-'*collums)
        return False


tiktaktoe(rows, collums)
print(tiktaktoe(rows, collums))

44804eda1ee17336531c27f64a1aa208f4b0062c
<mask token>

<mask token>


def tiktaktoe(rows, collums):
    if rows <= 30 and collums <= 108:
        for r in range(1, rows + 1):
            if r % 2 != 0:
                for c in range(1, collums + 1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end='')
                        else:
                            print('|', end='')
                    elif c % 2 != 0:
                        print(' ')
                    else:
                        print('|')
            else:
                print('-' * collums)
        return True
    else:
        for r in range(1, rows + 1):
            if r % 2 != 0:
                for c in range(1, collums + 1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end='')
                        else:
                            print('|', end='')
                    elif c % 2 != 0:
                        print(' ')
                    else:
                        print('|')
            else:
                print('-' * collums)
        return False


<mask token>

<mask token>


def tiktaktoe(rows, collums):
    if rows <= 30 and collums <= 108:
        for r in range(1, rows + 1):
            if r % 2 != 0:
                for c in range(1, collums + 1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end='')
                        else:
                            print('|', end='')
                    elif c % 2 != 0:
                        print(' ')
                    else:
                        print('|')
            else:
                print('-' * collums)
        return True
    else:
        for r in range(1, rows + 1):
            if r % 2 != 0:
                for c in range(1, collums + 1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end='')
                        else:
                            print('|', end='')
                    elif c % 2 != 0:
                        print(' ')
                    else:
                        print('|')
            else:
                print('-' * collums)
        return False


tiktaktoe(rows, collums)
print(tiktaktoe(rows, collums))

rows = int(input('Digit the # of rows: '))
collums = int(input('Digit the # of collums: '))


def tiktaktoe(rows, collums):
    if rows <= 30 and collums <= 108:
        for r in range(1, rows + 1):
            if r % 2 != 0:
                for c in range(1, collums + 1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end='')
                        else:
                            print('|', end='')
                    elif c % 2 != 0:
                        print(' ')
                    else:
                        print('|')
            else:
                print('-' * collums)
        return True
    else:
        for r in range(1, rows + 1):
            if r % 2 != 0:
                for c in range(1, collums + 1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end='')
                        else:
                            print('|', end='')
                    elif c % 2 != 0:
                        print(' ')
                    else:
                        print('|')
            else:
                print('-' * collums)
        return False


tiktaktoe(rows, collums)
print(tiktaktoe(rows, collums))

rows = int(input('Digit the # of rows: '))
collums = int(input('Digit the # of collums: '))


def tiktaktoe(rows, collums):
    if rows <= 30 and collums <= 108:
        for r in range(1, rows+1):
            if r % 2 != 0:
                for c in range(1, collums+1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end="")
                        else:
                            print('|', end="")
                    else:
                        if c % 2 != 0:
                            print(' ')
                        else:
                            print('|')
            else:
                print('-'*collums)
        return True
    else:
        for r in range(1, rows+1):
            if r % 2 != 0:
                for c in range(1, collums+1):
                    if c < collums:
                        if c % 2 != 0:
                            print(' ', end="")
                        else:
                            print('|', end="")
                    else:
                        if c % 2 != 0:
                            print(' ')
                        else:
                            print('|')
            else:
                print('-'*collums)
        return False


tiktaktoe(rows, collums)
print(tiktaktoe(rows, collums))
