d={}
d['Bajaj Avenger cruiz 220']={}
d['Bajaj Avenger cruiz 220']['Koramangala (opp. Forum Mall)']={'Advance':500,'WeekDayRate/hr':35,'WeekDayRate/day':700,'WeekEndRate/hr':45,'WeekEndRate/day':800}
d['Bajaj Avenger cruiz 220']['Koramangala (opp. Forum Mall)2']={'Advance':500,'WeekDayRate/hr':35,'WeekDayRate/day':700,'WeekEndRate/hr':45,'WeekEndRate/day':800}
'''

d={'Bajaj Avenger cruiz 220':
                    {'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}},

   'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},

                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}



    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}


    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}

    'Kawasaki Z800':{'Koramangala (opp. Forum Mall)': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35},
                    'Koramangala (opp. Forum Mall)2': {'WeekEndRate/hr': 45, 'Advance': 500, 'WeekDayRate/day': 700, 'WeekEndRate/day': 800, 'WeekDayRate/hr': 35}}



   }


for k,v in d.items():
    for k1,v1 in v.items():
        for k2,v2 in v1.items():
            print(v2)

'''

def costCalc(pickUpTotal,dropTotal,WeekDayRateHr,WeekDayRateDay, WeekEndRateHr, WeekEndRateDay):
    dateDiff=dropTotal-pickUpTotal
    totalHr=dateDiff.total_seconds()/3600
    pickVar=pickUpTotal
    dropVar=dropTotal
    qut=int(totalHr/24)
    rem=totalHr%24
    i=0
    weekdayCount=0
    weekendCount=0
    remDropHr=0
    cost=0
    while(i<qut):
        if(pickVar.weekday()<=3):
            weekdayCount=weekdayCount+1
        else:
            weekendCount=weekendCount+1
        print(pickVar)
        pickVar=pickVar+timedelta(days=1)
        print(weekdayCount,weekendCount,rem)
        i=i+1
    print(totalHr)
    if(totalHr<21):
        if(pickUpTotal.weekday()<=3):
            hrCost=totalHr*WeekDayRateHr
        else:
            hrCost=totalHr*WeekEndRateHr
    elif(rem>=21 and rem<24):
        if(pickUpTotal.weekday()<=3):
            hrCost=WeekDayRateDay
        else:
            hrCost=WeekEndRateDay
    else:
        if(dropVar.weekday()<=3):
            hrCost=rem*WeekDayRateHr
        else:
            hrCost=rem*WeekEndRateHr
    cost=weekdayCount*WeekDayRateDay+weekendCount*WeekEndRateDay+hrCost
    
    print(cost)
    
    
    
pickUpTotal=datetime.strptime('24-02-2017 12', "%d-%m-%Y %H")                                                                            
dropTotal=datetime.strptime('26-02-2017 9', "%d-%m-%Y %H")

pickUpDate=pickUpTotal.strftime('%d')                                                                            
dropDate=dropTotal.strftime('%d')

pickUpTime=pickUpTotal.strftime('%H')                                                                            
dropTime=dropTotal.strftime('%H')


costCalc(pickUpTotal,dropTotal,35,700,45,850)


'''
algo:
q=days
r=hr
diff=4
while 

'''










