If (front), then return first element, else return last element in
String