Write a function whose input parameters are a string, an integer k. The function should return a string of length k, which is the alignment of the first string to length k.