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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: H = None
        self.t: H = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: H = None
        self.t: H = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.txt = txt

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

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

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