def METHOD_NAME(items, stream=sys.stdout):
    try:
        item_per_line = (not stream.isatty())
    except:
        item_per_line = True
    if item_per_line:
        for item in items:
            print(item)
    else:
        print(' '.join(map(str, items)))