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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: B = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: B = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.txt = txt

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

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

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

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