from sys import argv

unit2mult = {: 0.7112, : 0.01,     :   0.0254,
             :    0.3048, :  1000.0,   :  0.00254,
             :  1.0,    :      7467.6,   :    0.1778,
             : 2.1336, :     0.000254, : 0.04445,
             : 1066.8}

if __name__ == '__main__':
    assert len(argv) == 3, 'ERROR. Need two arguments - number then units'
    try:
        value = float(argv[1])
    except:
        print('ERROR. First argument must be a (float) number')
        raise
    unit = argv[2]
    assert unit in unit2mult, ( 'ERROR. Only know the following units: ' 
                                + ' '.join(unit2mult.keys()) )

    print(% (value, unit))
    for unt, mlt in sorted(unit2mult.items()):
        print(' %10s:%g'% (unt, value * unit2mult[unit] / mlt))