THE Taiwan government plans to open missions in the Baltic states in one of its biggest diplomatic gains in years against the rival communist government on mainland China.Taipei will soon exchange legations with Latvia as part of a diplomatic advance on the now independent parts of the shattered Soviet Union. The Republic of China will also open similar offices with full diplomatic privileges in Estonia and Lithuania next year, says Lo Jyh-yuan, director of the Foreign Ministry's Department of West Asian affairs. The push by Taiwan into the Baltics is the latest effort in its "flexible diplomacy," in which it accepts any form of relations that does not compromise its claim to sovereignty over all of China. The policy has been especially successful since 1989, when Beijing's prestige plummeted because of its massacre of pro-democracy activists. The steady collapse of communism has also opened opportunities for Taiwan and bolstered its message of rapid development and prosperity through capitalism. Beijing and Taipei have jostled one another in diplomacy since 1949, when the Nationalist government fled to Taiwan from communist forces on the mainland. Taiwan is excluded from the United Nations, the General Agreement on Tariffs and Trade, and many other international organizations. In November, however, it was admitted into the 15-member Asia Pacific Economic Cooperation Forum. The mainland had stalled its membership for two years. Taipei maintains relations with only 29 countries, mostly Caribbean islands or countries in Central America. China has pressured many countries into denying Taiwan envoys diplomatic status and the privilege of opening a mission. So the island upholds its interests in much of the world through trade offices or semi-official organizations. In Europe, it maintains full relations only with the Vatican. Mainland China and the Baltic states have also established diplomatic relations, but Latvian recognition of the mainland was an expedient move to win entry into the United Nations, Latvian Foreign Minister Janis Jurkans indicated during a visit to Taipei this month. Beijing, a permanent member of the UN Security Council, holds a decisive vote over UN applications. In the Baltics, mainland China apparently finds it unusually hard to compete for diplomatic favor against the thriving capitalist economy of Taiwan. The republics have little sense of affinity toward Beijing. For decades they were occupied by a hard-line communist regime, and appear to find a soulmate in Taipei. "Latvia was under communist occupation for 50 years, it has wanted very much to be free and independent, and they know the Republic of China is one country with much experience in dealing with communism," says Mr. Lo. Business practices on Taiwan and the state's economic policy offer the Baltics a loose model for rapid economic development, says Foreign Minister Fredrick Chien. Taiwan in the past four decades has raised its per capita GNP from $137 to about $8,000. But Taiwan offers something more tangible than an economic model: cold cash. Taiwan has reserves of $80 billion, the highest of any country, and its businesses are among the most active foreign investors in Asia. Taiwan has also made the former Soviet republics a priority target for a $1.2 billion foreign aid fund. So far the fund has gone to developing countries, in the form of loans or development projects sponsored by Taipei. The government has lured high-ranking European officials to the island in the past several months who hope to secure a chunk of a six-year $300-billion development plan for the island. For now, Taiwan is considering helping Latvia and the other republics of the defunct Soviet Union meet their basic needs this winter. It might ship the republics food or provide them other assistance, according to Lo. For its part, China is rushing to make contacts with the republics of the former Soviet Union that have formed the Commonwealth of Independent States. Beijing dispatched officials to five of the republics on Dec. 25, a day after officially recognizing the collapse of the Soviet Union. China must also keep an eye on its small rival's moves in Eastern Europe. A Taiwan diplomat traveled to Prague on Dec. 20 to open the Taipei Economic and Trade Office there, says Kung Sainting, director of the ministry's department of European Affairs. The island republic for 16 months has run a similar office attending to consular and economic matters in Budapest. It plans to soon open another one in Warsaw, says Mr. Kung. Taiwan has established an exchange program with Hungary to train managers of light industry, the island's forte, according to Kung. Trade with the seven countries in Eastern Europe rose 49 percent in the first 11 months of this year compared to the same period in 1990.