class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.u: A = 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.y: A = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

m = A("m")
g = B("g")
l = C("l")
a = A("a")
k = B("k")
i = A("i")
e = C("e")
h = C("h")
c = B("c")
j = A("j")

m.s = l
m.r = i
m.u = a
g.v = m
l.y = j
l.r = j
l.t = a
a.s = e
a.r = m
a.u = i
k.v = a
i.s = e
i.r = j
i.u = j
e.y = j
e.t = j
e.r = i
h.y = m
h.t = i
h.r = j
c.v = i
j.s = e
j.r = i
j.u = m
assert e.r.r.s.y.s.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.u: A = 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.y: A = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

m = A("m")
g = B("g")
l = C("l")
a = A("a")
k = B("k")
i = A("i")
e = C("e")
h = C("h")
c = B("c")
j = A("j")

m.s = l
m.r = i
m.u = a
g.v = m
l.y = j
l.r = j
l.t = a
a.s = e
a.r = m
a.u = i
k.v = a
i.s = e
i.r = j
i.u = j
e.y = j
e.t = j
e.r = i
h.y = m
h.t = i
h.r = j
c.v = i
j.s = e
j.r = i
j.u = m
assert e.r.r.s.y.s.t.s.txt == "e"