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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.x: A = None
        self.z: D = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: J = None
        self.y: J = None
        self.x: J = None
        self.p: E = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: E = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.x: A = None
        self.z: D = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: J = None
        self.y: J = None
        self.x: J = None
        self.p: E = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: E = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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