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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: E = None
        self.r: E = None
        self.u: E = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.t: B = None
        self.z: B = None
        self.p: C = None
        self.txt = txt

d = A("d")
m = B("m")
j = C("j")
f = D("f")
l = E("l")
b = F("b")
a = E("a")
k = E("k")
e = B("e")

d.y = m
d.t = e
m.t = f
m.w = j
m.y = l
j.u = e
f.y = d
f.z = a
f.r = a
f.u = k
f.t = j
f.p = b
l.w = e
l.z = e
l.o = f
b.o = f
b.y = l
b.t = m
b.z = e
b.p = j
a.w = m
a.o = f
a.z = e
k.w = e
k.z = e
k.o = f
e.t = f
e.w = j
e.y = l
assert l.o.r.o.p.z.w.u.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: E = None
        self.r: E = None
        self.u: E = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.t: B = None
        self.z: B = None
        self.p: C = None
        self.txt = txt

d = A("d")
m = B("m")
j = C("j")
f = D("f")
l = E("l")
b = F("b")
a = E("a")
k = E("k")
e = B("e")

d.y = m
d.t = e
m.t = f
m.w = j
m.y = l
j.u = e
f.y = d
f.z = a
f.r = a
f.u = k
f.t = j
f.p = b
l.w = e
l.z = e
l.o = f
b.o = f
b.y = l
b.t = m
b.z = e
b.p = j
a.w = m
a.o = f
a.z = e
k.w = e
k.z = e
k.o = f
e.t = f
e.w = j
e.y = l
assert l.o.r.o.p.z.w.u.w.u.txt == "e"