# Programmer: Sriram Pemmaraju
# Date: Feb 20, 2015

# String variables corresponding to each range. 
# As numbers are classified into these ranges, we will
# append stars to each of these strings, representing the
# histogram
range1 = "[0, 25]    "
range2 = "(25, 50]   "
range3 = "(50, 75]   "
range4 = "(75, 100]  "

# This loop will read the input repeatedly and if the
# input is not "Done" then it is expected to be a number
# that is classified into one of 4 ranges: [0, 25],
# (25, 50], (50, 75], (75, 100].
while True:
    line = input()
    if line == "Done":
        break
    
    # Otherwise, the input is a number in [0, 100]
    # and needs to be classified.
    n = int(line)
    if n <= 25:
        range1 = range1 + "*"
    elif n <= 50:
        range2 = range2 + "*"
    elif n <= 75:
        range3 = range3 + "*"
    else:
        range4 = range4 + "*"
        
print(range1)
print(range2)
print(range3)
print(range4)