def U_XY(j, n):
    """Makes a sequence of operations for XY basis.

    Args:
        j (int): Position of 'HK'.
        n (int): Length of the sequence.

    Returns:
        str: Sequence of operations.

    """
    assert j < n - 1
    assert n > 2
    return 'I' * j + "HK" + 'I' * (n - j - 2)