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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: I = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: G = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.p: F = None
        self.x: I = None
        self.w: C = None
        self.r: I = None
        self.u: C = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.v: B = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: I = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: G = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.p: F = None
        self.x: I = None
        self.w: C = None
        self.r: I = None
        self.u: C = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.v: B = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

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