class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: C = None
        self.s: F = None
        self.z: D = None
        self.v: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: G = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: H = None
        self.y: J = None
        self.p: C = None
        self.v: J = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: A = None
        self.z: E = None
        self.r: F = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.txt = txt

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

h.o = a
h.z = a
h.u = f
h.s = b
h.v = m
d.u = a
d.w = a
d.s = g
d.t = k
d.o = k
d.p = f
d.z = f
d.q = j
d.v = n
d.x = h
f.v = b
f.q = b
f.y = b
f.o = b
f.w = m
f.x = n
f.u = n
f.z = g
f.s = h
f.p = h
a.p = m
a.u = n
a.o = h
a.q = b
k.s = j
k.r = d
b.z = n
b.v = d
b.o = m
b.p = k
b.q = h
n.z = a
n.x = a
n.s = j
n.y = m
n.v = m
n.p = f
j.r = k
j.w = a
g.s = m
g.x = h
g.z = k
g.r = b
g.y = d
g.u = d
m.v = n
m.u = j
assert a.o.u.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: C = None
        self.s: F = None
        self.z: D = None
        self.v: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: G = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: H = None
        self.y: J = None
        self.p: C = None
        self.v: J = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: A = None
        self.z: E = None
        self.r: F = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.txt = txt

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

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