If you are a Hungarian passport holder, and your next destination is a third-party region out of mainland China (for example, Budapest-Beijing-Tokyo, Prague-Shanghai-Hong Kong), you can enjoy a 72-hour-visa-free transit in one of the following cities in China:
Beijing, Shanghai, Guangzhou, Chengdu, Shenyang, Hangzhou, Xi'an, Tianjin, Wuhan, Nanjing, Dalian, Guilin, Kunming, Chongqing, Harbin, Xiamen, Qingdao, and Changsha.
Take Beijing as an example. Upon arrival in Beijing Capital International Airport, follow the sign leading you to a special channel for the 72-hr-visa-free-transit passengers. Show your joint flight ticket, with confirmed date and seat, which will take you to a third-party destination, to the Chinese border services. You will get a stamp on your passport, indicating how long you can stay within the Beijing region. Then you can start your short trip. Remember to catch your flight in time.
To make things better, from the year 2016, if you travel from abroad via Shanghai to another region out of China, you can even enjoy 144-hour-visa-free convenience and stay in a much larger area including not only Shanghai, but also adjacent Jiangsu province and Zhejiang province. For now, this only applies to passengers arriving in Shanghai.
Please contact your airliner in advance to confirm they are aware of this arrangement. The Chinese side has informed all foreign airliners with service in China. But different air companies may have different implementation.
Hope you have a nice journey.