class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: G = None
        self.z: E = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: A = None
        self.o: E = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.q: B = None
        self.s: E = None
        self.w: H = None
        self.t: A = None
        self.o: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: D = None
        self.x: E = None
        self.z: G = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: A = None
        self.o: E = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.q: B = None
        self.s: E = None
        self.w: H = None
        self.t: A = None
        self.o: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: D = None
        self.x: E = None
        self.z: G = None
        self.u: E = None
        self.t: E = None
        self.txt = txt

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

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

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