LIVINGSTON, Mont. (AP) _ Five months after Burlington Northern Railroad shut down its 81-year-old locomotive repair shops, wiping out 360 jobs, Livingston seems to be thriving when many feared it would be foundering.

Freight trains still lumber through the city, the familiar green Burlington Northern trucks roam the streets, train crews still call Livingston home, and a bustling downtown seems unaware it has lost a $10 million annual payroll.

Livingston, a community of 7,000 about 50 miles north of Yellowstone National Park, had a good tourist season and is still a popular haunt with hunters and fall fishermen.

Business is off no more than in other cities in Montana, and new development is being forecast.

But most residents agree the full impact of the railroad's pullout will not be felt until this winter, the first without the full shop payroll.

''It's not the end,'' said LuAn Peterson, the wife of one affected rail worker.

Robert Gersack, president of First Bank Livingston, fears some businesses will not survive the winter, but he remains guardedly optimistic.

''Livingston is not going to dry up and blow away,'' he said. ''I don't know what form it will take in the years to come, but we can't hang our hat on tourism replacing everything.

''The loss of the stability of the railroad jobs created uncertainty and maybe we won't replace those incomes ever again,'' he added.

Livingston schools lost 400 students because of the railroad's pullout, but gained 140 back because of new families moving into town. The district still anticipates losing $400,000 in state aid because of decreased enrollment and has already eliminated 15 teaching jobs, according to Superintendent Gaylord Lasher.

''We were prepared for the worst and hoped for the best. We came out of it the best possible,'' he said.

The housing market, depressed by 25 to 30 percent after Burlington Northern announced its plans one year ago, is expected to recover by next spring, according to real estate brokers.

''We're not as bad off as expected. The attitude of local people has kept the impact from being more drastic,'' said Phil Magsig of Aspen Realty. ''We were sorry to see our neighbors go, but determined to make this a viable community.''

Burlington Northern contributed $1 million to help mitigate the impact of its pullout. A Livingston Community Trust and a Park County Economic Development Corp. were created to promote economic development, and the abandoned passenger depot is being converted into a museum.

The fears that spread through this city a year ago seem to have disappeared.

''People hunkered down,'' said Mayor Bill Dennis. ''They didn't roll up the sidewalks just because BN pulled out. People just can't sit around and feel sorry for ourselves.

''You gotta think positive. If you think that way, it's going to happen. Everyone had a long face a year ago. Now they're deciding it's going to be better than anticipated.''