Naive alignment algorithm.