__author__ = 'RemiZOffAlex'
__email__ = 'remizoffalex@mail.ru'


def gettree(number, count=3):
    """
    Сформировать дерево каталогов
    """
    result = []
    newline = str(number)
    while len(newline) % count:
        newline = '0' + newline
    for i in range(0, len(newline)//count):
        result.append(newline[i*count:i*count+count])
    return result


def gethashtree(hash, count=3):
    """
    Сформировать дерево каталогов
    """
    result = []
    for i in range(0, count):
        element = hash[2*i:2*(i+1)]
        result.append(element)
    return '/'.join(result)
