Hamiltonian lines in infinite graphs with few vertices of small valency