def split_into_groups(s, length=3):
    """splits given string into groups of length"""
    if length < 0:
        raise TypeError('split length must be >= 0')
    s = ''.join(reversed(s))
    groups = [s[i:i + length] for i in range(0, len(s), length)]
    return [''.join(reversed(g)) for g in reversed(groups)]