class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: I = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: H = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: H = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

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

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