class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: E = None
        self.r: G = None
        self.y: D = None
        self.s: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: E = None
        self.u: B = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: E = None
        self.u: B = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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