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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.z: D = None
        self.w: D = None
        self.y: F = None
        self.s: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: A = None
        self.q: H = None
        self.u: A = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.z: D = None
        self.w: D = None
        self.y: F = None
        self.s: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: A = None
        self.q: H = None
        self.u: A = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.txt = txt

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

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