------
## 最终结论
```python
def skier_time(test_cases):
    results = []
    for path in test_cases:
        visited_segments = set()
        current_position = (0, 0)
        total_time = 0
        for move in path:
            if move == 'N':
                next_position = (current_position[0], current_position[1] + 1)
            elif move == 'S':
                next_position = (current_position[0], current_position[1] - 1)
            elif move == 'E':
                next_position = (current_position[0] + 1, current_position[1])
            elif move == 'W':
                next_position = (current_position[0] - 1, current_position[1])

            segment = tuple(sorted([current_position, next_position]))

            if segment not in visited_segments:
                total_time += 5
                visited_segments.add(segment)
            else:
                total_time += 1

            current_position = next_position

        results.append(total_time)
    return results

# Example usage:
t = int(input().strip())
test_cases = [input().strip() for _ in range(t)]
result_times = skier_time(test_cases)
for time in result_times:
    print(time)
```