Attention layers provably solve single-location regression