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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.s: C = None
        self.q: E = None
        self.z: J = None
        self.y: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: A = None
        self.u: F = None
        self.o: E = None
        self.y: J = None
        self.v: G = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: I = None
        self.v: I = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.x: A = None
        self.p: J = None
        self.v: F = None
        self.y: D = None
        self.q: C = None
        self.o: B = None
        self.u: A = None
        self.txt = txt

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

h = A("h")
j = B("j")
m = C("m")
i = D("i")
e = E("e")
n = F("n")
f = G("f")
d = H("d")
k = I("k")
a = J("a")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.s: C = None
        self.q: E = None
        self.z: J = None
        self.y: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: A = None
        self.u: F = None
        self.o: E = None
        self.y: J = None
        self.v: G = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: I = None
        self.v: I = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.x: A = None
        self.p: J = None
        self.v: F = None
        self.y: D = None
        self.q: C = None
        self.o: B = None
        self.u: A = None
        self.txt = txt

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

h = A("h")
j = B("j")
m = C("m")
i = D("i")
e = E("e")
n = F("n")
f = G("f")
d = H("d")
k = I("k")
a = J("a")

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