class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: D = None
        self.o: F = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: D = None
        self.p: C = None
        self.o: C = None
        self.x: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: H = None
        self.o: C = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: D = None
        self.p: C = None
        self.o: C = None
        self.x: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: H = None
        self.o: C = None
        self.q: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.u: A = None
        self.txt = txt

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

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