class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.v: C = None
        self.w: C = None
        self.x: C = None
        self.y: F = None
        self.o: F = None
        self.z: C = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: A = None
        self.w: G = None
        self.z: A = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: A = None
        self.w: G = None
        self.z: A = None
        self.t: F = None
        self.txt = txt

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

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