class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: C = None
        self.v: C = None
        self.q: C = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.r: D = None
        self.y: D = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.w: D = None
        self.v: B = None
        self.p: D = None
        self.z: A = None
        self.txt = txt

e = A("e")
j = B("j")
h = C("h")
l = D("l")
f = E("f")
c = F("c")
m = F("m")
d = E("d")

e.y = l
e.s = h
e.v = h
e.q = h
e.u = h
j.w = h
h.x = l
h.r = l
h.y = l
h.o = l
h.t = l
h.s = m
l.o = f
f.w = c
f.p = h
f.x = d
c.s = d
c.o = h
c.w = l
c.p = l
c.v = j
c.z = e
m.s = f
m.o = h
m.w = l
m.p = l
m.v = j
m.z = e
d.w = c
d.p = h
d.x = f
assert d.x.w.z.y.o.x.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: C = None
        self.v: C = None
        self.q: C = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.r: D = None
        self.y: D = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.w: D = None
        self.v: B = None
        self.p: D = None
        self.z: A = None
        self.txt = txt

e = A("e")
j = B("j")
h = C("h")
l = D("l")
f = E("f")
c = F("c")
m = F("m")
d = E("d")

e.y = l
e.s = h
e.v = h
e.q = h
e.u = h
j.w = h
h.x = l
h.r = l
h.y = l
h.o = l
h.t = l
h.s = m
l.o = f
f.w = c
f.p = h
f.x = d
c.s = d
c.o = h
c.w = l
c.p = l
c.v = j
c.z = e
m.s = f
m.o = h
m.w = l
m.p = l
m.v = j
m.z = e
d.w = c
d.p = h
d.x = f
assert d.x.w.z.y.o.x.x.p.txt == "h"