UVA Level 1 string problems