class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.s: A = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

j = A("j")
a = B("a")
g = C("g")
b = D("b")
k = E("k")
l = F("l")
c = G("c")
f = A("f")
i = D("i")
e = A("e")

j.r = c
j.s = g
a.y = l
a.s = c
g.s = l
g.p = j
g.y = a
b.x = i
b.t = c
b.s = f
b.u = g
b.v = e
k.y = b
l.o = g
c.s = k
f.r = c
f.s = g
i.x = b
i.t = c
i.s = j
i.u = g
i.v = e
e.r = c
e.s = g
assert e.s.p.s.s.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.s: A = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

j = A("j")
a = B("a")
g = C("g")
b = D("b")
k = E("k")
l = F("l")
c = G("c")
f = A("f")
i = D("i")
e = A("e")

j.r = c
j.s = g
a.y = l
a.s = c
g.s = l
g.p = j
g.y = a
b.x = i
b.t = c
b.s = f
b.u = g
b.v = e
k.y = b
l.o = g
c.s = k
f.r = c
f.s = g
i.x = b
i.t = c
i.s = j
i.u = g
i.v = e
e.r = c
e.s = g
assert e.s.p.s.s.o.s.txt == "l"