Auslander-reiten sequences with few middle terms and applications to string algebrass