Used StringJoiner to provide linked list like output