#!/usr/bin/python
#Discus--, Discus-
import sys 

def hex2dec(s):
 return int(s, 16)
            
def calc(ssid):
    if len(ssid) != 6:
        return False
    constant = hex2dec("D0EC31")
    ssid_hex = hex2dec(ssid)
    wpa_const = "YW0"
    wpa = (ssid_hex - constant)/4
    wpa = ["%s%s" % (wpa_const, wpa)]
    return wpa

