class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: C = None
        self.z: D = None
        self.y: H = None
        self.t: A = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.s: F = None
        self.u: C = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: F = None
        self.p: A = None
        self.t: A = None
        self.v: I = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.s: C = None
        self.o: F = None
        self.u: D = None
        self.t: D = None
        self.z: E = None
        self.x: B = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: C = None
        self.z: D = None
        self.y: H = None
        self.t: A = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.s: F = None
        self.u: C = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: F = None
        self.p: A = None
        self.t: A = None
        self.v: I = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.s: C = None
        self.o: F = None
        self.u: D = None
        self.t: D = None
        self.z: E = None
        self.x: B = None
        self.y: H = None
        self.txt = txt

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

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