import random


def randomseq(length, letters):
    """
    Returns a sequence of a certain length with a composition of letters given as input.

    Args:
        length (int): Length of the sequence
        letters (string): A string containing all the possible letters

    Returns:
        Sequence (string): A sequence in uppercase

    """
    sequence = ''.join(random.choice(letters) for i in range(length))
    return(sequence.upper())