# -*- coding: utf-8 -*-
"""
Created on Sat Oct 19 12:34:34 2019

@author: 1-26-PB-L2-13
"""

devices=["R1","R2","R3","S1","S2"]
for item in devices:
    print(item)

print(" ")

for item in devices:
    if "R" in item:
        print(item)

print(" ")

for item in devices:
    if "S" in item:
        print(item)

print(" ")

for item in devices:
    if "1" in item:
        print(item)

print(" ")

for item in devices:
    if "2" in item:
        print(item)