def generate_base_code(naval_base: bool,
                   scout_base: bool,
                   pirate_base: bool) -> str:
    """Returns a base code, one of:

    A -- Naval Base and Scout Base/Outpost
    G -- Scout Base/Outpost and Pirate Base
    N -- Naval Base
    P -- Pirate Base
    S -- Scout Base/Outpost
    """
    if naval_base and scout_base:
        return "A"
    elif scout_base and pirate_base:
        return "G"
    elif naval_base:
        return "N"
    elif pirate_base:
        return "P"
    elif scout_base:
        return "S"
    else:
        return " "