class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: D = None
        self.s: C = None
        self.p: G = None
        self.t: I = None
        self.y: I = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.q: D = None
        self.o: C = None
        self.y: H = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.t: B = None
        self.w: I = None
        self.v: G = None
        self.x: C = None
        self.r: E = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.s: E = None
        self.z: H = None
        self.x: H = None
        self.txt = txt

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

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

m = A("m")
a = B("a")
i = C("i")
k = D("k")
h = E("h")
b = F("b")
j = G("j")
f = H("f")
l = I("l")

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.q: D = None
        self.o: C = None
        self.y: H = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.t: B = None
        self.w: I = None
        self.v: G = None
        self.x: C = None
        self.r: E = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.s: E = None
        self.z: H = None
        self.x: H = None
        self.txt = txt

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

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

m = A("m")
a = B("a")
i = C("i")
k = D("k")
h = E("h")
b = F("b")
j = G("j")
f = H("f")
l = I("l")

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