TOKYO - Japan posted a 1.22 trillion yen ($7.7 billion) trade deficit in May, after a weak yen inflated the value of imports, offsetting a continued increase in exports that hit a record high for the month, government data showed Wednesday.