class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.v: E = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: F = None
        self.u: F = None
        self.q: D = None
        self.s: F = None
        self.w: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.o: G = None
        self.z: E = None
        self.w: F = None
        self.r: C = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: G = None
        self.o: C = None
        self.v: H = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

d = A("d")
c = B("c")
h = C("h")
l = D("l")
g = E("g")
b = F("b")
k = G("k")
i = H("i")
e = C("e")
n = F("n")

d.o = b
d.t = k
d.v = g
d.y = g
d.x = c
c.o = b
c.s = b
c.z = n
c.u = n
c.w = n
c.q = l
c.v = i
h.p = e
h.r = e
h.x = k
h.o = k
h.z = g
h.y = g
h.w = b
h.u = c
l.z = g
l.s = g
l.w = d
g.w = h
g.o = h
g.y = k
g.q = k
g.v = i
b.u = h
k.o = i
k.z = i
i.w = k
e.p = h
e.r = h
e.x = k
e.o = k
e.z = g
e.y = g
e.w = b
e.u = c
n.u = e
assert e.x.z.w.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.v: E = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: F = None
        self.u: F = None
        self.q: D = None
        self.s: F = None
        self.w: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.o: G = None
        self.z: E = None
        self.w: F = None
        self.r: C = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: G = None
        self.o: C = None
        self.v: H = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

d = A("d")
c = B("c")
h = C("h")
l = D("l")
g = E("g")
b = F("b")
k = G("k")
i = H("i")
e = C("e")
n = F("n")

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