from typing import List


def make_parallel_commands(
    commands: str, repeats: int, parallel: int
) -> List[List[str]]:
    """ Build list of lists,
     where the inner list contains a group of commands to be executed in a sequence"""

    command_list = commands.split("|")
    command_list = [comm.strip() for comm in command_list]
    command_list = command_list * repeats

    groups = [[] for _ in range(parallel)]
    current_group = 0
    for comm in command_list:
        groups[current_group].append(comm)
        current_group += 1
        if current_group == parallel:
            current_group = 0
    # trim unused groups
    groups = [group for group in groups if len(group) > 0]
    return groups