# Author:Grace
menu = {
'北京':{
'海淀':{
'五道口':{
'soho':{},
'网易':{},
'google':{}
},
'中关村':{
'爱奇艺':{},
'汽车之家':{},
'youku':{},
},
'上地':{
'百度':{},
},
},
'昌平':{
'沙河':{
'老男孩':{},
'北航':{},
},
'天通苑':{},
'回龙观':{},
},
'朝阳':{},
'东城':{},
},
'上海':{
'闵行':{
"人民广场":{
'炸鸡店':{}
}
},
'闸北':{
'火车战':{
'携程':{}
}
},
'浦东':{},
},
'山东':{},
}
exit_flag=False

while not exit_flag :
for i in menu:
print(i)
choice1 = input("Please input your choice1:")
if choice1 in menu:
while not exit_flag:
for j in menu[choice1]:
print("\t",j)
choice2=input("Please input your choice2:")
if choice2 in menu[choice1]:
while not exit_flag:
for m in menu[choice1][choice2]:
print("\t\t",m)
choice3=input("Please input your choice3:")
if choice3 in menu[choice1][choice2]:
for n in menu[choice1][choice2][choice3]:
print("\t\t\t",n)
choice4=input("最后一层,按b返回")
if choice4=="b":
break
elif choice3 =="b":
break
else:
exit_flag=True
elif choice2 == "b":
break
else:
exit_flag=True
elif choice1 == "b":
break
else:
exit_flag=True