A wire of resistance $ R $ is bent into a triangular pyramid as shown in the figure, with each segment having the same length. The resistance between points $ A $ and $ B $ is $ \frac{R}{n} $. The value of $ n $ is:

Rearrange the following parts to form a meaningful and grammatically correct sentence:
P. that maintaining a positive attitude
Q. even in difficult situations
R. is essential for success
S. and helps overcome obstacles effectively