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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: H = None
        self.u: D = None
        self.o: D = None
        self.r: D = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: E = None
        self.s: H = None
        self.y: G = None
        self.p: B = None
        self.o: I = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.o: I = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: B = None
        self.u: G = None
        self.w: B = None
        self.r: A = None
        self.q: A = None
        self.y: B = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.w: B = None
        self.s: I = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: H = None
        self.u: D = None
        self.o: D = None
        self.r: D = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: E = None
        self.s: H = None
        self.y: G = None
        self.p: B = None
        self.o: I = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.o: I = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: B = None
        self.u: G = None
        self.w: B = None
        self.r: A = None
        self.q: A = None
        self.y: B = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.w: B = None
        self.s: I = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

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

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