class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: H = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: D = None
        self.w: D = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.r: I = None
        self.p: B = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.x: H = None
        self.p: E = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: C = None
        self.q: A = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: D = None
        self.w: D = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.r: I = None
        self.p: B = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.x: H = None
        self.p: E = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: C = None
        self.q: A = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

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

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

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