'typename' could not necessarily be replaced by 'class' here. In this
usage the 'typename' keyword indicates that Node is a nested
(dependent) type defined in class Chain, which might for example be
defined in that class by a typedef or the using keyword. Employing
'class' in place of 'typename' would indicate that Node is a nested
class or struct type defined within a class Chain or a Chain namespace.
Typical usage of 'typename' here would be if 'walk' is a method of a
template class having Chain as a template parameter. It would
indicate that Chain::Node is a dependant type of Chain. If there is no
template definition involved here, then assuming Chain::Node is indeed
a type alias, in C++11 onwards 'typename' is harmless but redundant.
With C++98/03 I think it would be an error.