Hapag-Lloyd swings to first quarter profit