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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: G = None
        self.s: H = None
        self.o: E = None
        self.w: C = None
        self.r: B = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: G = None
        self.s: H = None
        self.o: E = None
        self.w: C = None
        self.r: B = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

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

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