The emperor of Japan waited with a faint smile. The empress nodded gently in encouragement. And finally, 12-year-old Mary Kuzmick overcame the giggles long enough to welcome them, in Japanese, to Fairfax County's Great Falls Elementary.

It was an A-plus performance early yesterday that left the royal guests looking impressed and Mary elated: She had passed a language skills test she could not have imagined taking when she began studying Japanese four years ago.

"It was just a once-in-a-lifetime chance," the sixth-grader said later. "It was really great."

The visit by Emperor Akihito and Empress Michiko was intended to draw attention to the school's Japanese language immersion program, one of just a few such programs in the United States and a source of fascination for many Japanese, who believe that Americans are uninterested in Asian culture.

But the ceremony was festive, a celebration of the language itself, as several children joined Mary in greeting the royal couple and more than 300 Great Falls students serenaded them with "It's A Small World," in the visitors' language.

Almost everything about the royal visit seemed to awe the children, including the Secret Service agents who could not stand still and the police helicopter stitching noisy patterns overhead.

First, there was the arrival. As soon as the couple got out of their black limousine, they surprised security personnel by darting toward a group of kindergartners dressed in bright sun dresses and extra-small polo shirts.

Empress Michiko repeatedly bent down to say hello to children as her husband bowed and cast his smile from side to side, like a spotlight.

Casey Partee, 6, and other students offered the empress the small Japanese flags they were waving. Elise Trent, 6, proudly announced that the empress had said "Hi" to her. "I thought it was very generous," said teacher Ellen Keyser.

Once inside, the couple toured the math, science and health classrooms where students spend half of each school day immersed in Japanese.

They seemed amazed by the youngsters' fluency and at the classroom walls, which are filled with signs and posters, and virtually everything in Japanese. One poster said, "No Talking," and depicted a mouth with a slash through it.

In one class, a group of fourth-graders computed ratios with colored beads. Then they practiced saying the names of colors and writing the words in the air, using Japanese symbols. No English was spoken. "You did a good job," the emperor told the 8- and 9-year-olds.

The couple also looked in on first-graders practicing how to tell time. Holding the hands of a clock, the teacher put the 28 children through their paces as the empress strained to listen.

After another quick stop at a second-grade classroom where dinosaurs were being studied, the couple moved on to the gymnasium, which was outfitted with a red carpet, dozens of chrysanthemums and a small stage framed by the flags of Virginia, the United States and Japan.

Mary Kuzmick and several other children greeted the royal couple and presented them with crystal etched with an image of the school. Emperor Akihito -- saying he was "very much impressed" with the 130-plus children in the five-year-old language program -- encouraged the children to continue reaching out to other cultures.

"The relations between the United States and Japan go back many years," he said. "It is very important for the people of the two countries to know a great deal about the history and culture that the other peoples have followed. What you are learning in this school will be of very great benefit to you as you become older."