def str2bool(S):
    """convert a string to a boolean
    we use only the first letter"""
    return {'0': False, 'n': False, 'N': False, 'f': False, 'F': False, '1':
        True, 'y': True, 'Y': True, 't': True, 'T': True}[S[0]]
