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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

j = A("j")
a = B("a")
c = C("c")
m = A("m")
l = A("l")
k = C("k")
e = C("e")
n = C("n")
f = C("f")

j.t = n
j.y = f
j.r = e
a.v = j
c.x = j
c.r = m
c.s = l
m.t = f
m.y = c
m.r = n
l.t = f
l.r = f
l.y = c
k.x = j
k.r = m
k.s = l
e.x = j
e.r = l
e.s = l
n.x = l
n.r = j
n.s = j
f.x = j
f.r = l
f.s = m
assert c.x.r.s.y.s.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

j = A("j")
a = B("a")
c = C("c")
m = A("m")
l = A("l")
k = C("k")
e = C("e")
n = C("n")
f = C("f")

j.t = n
j.y = f
j.r = e
a.v = j
c.x = j
c.r = m
c.s = l
m.t = f
m.y = c
m.r = n
l.t = f
l.r = f
l.y = c
k.x = j
k.r = m
k.s = l
e.x = j
e.r = l
e.s = l
n.x = l
n.r = j
n.s = j
f.x = j
f.r = l
f.s = m
assert c.x.r.s.y.s.t.s.txt == "m"