Seoul shares reversed early losses to close at a three-week high on Thursday as recently undervalued shares extended gains, while foreigners continuously offloaded local stocks. The Korea Composite Stock Price Index (KOSPI) ended up 1.4 percent at 1,962.11, the strongest since August 17. Shipbuilders outperformed the broad market, closing up 5.9 percent. Samsung Heavy Industries Co Ltd and Daewoo Shipbuilding & Marine Engineering Co Ltd climbed 9.6 and 7.5 percent, respectively. Foreigners were net sellers for a 26th consecutive session, marking the longest selling spree in July 2008. During the 26 days, they offloaded 5.3 trillion won ($4.44 billion) of stocks in the main board, preliminary data showed.