class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: E = None
        self.w: I = None
        self.y: D = None
        self.p: G = None
        self.s: E = None
        self.t: I = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: E = None
        self.t: F = None
        self.p: C = None
        self.u: G = None
        self.q: B = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: E = None
        self.v: H = None
        self.z: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: I = None
        self.r: C = None
        self.w: H = None
        self.o: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.z: B = None
        self.t: D = None
        self.x: C = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: B = None
        self.y: C = None
        self.r: F = None
        self.t: D = None
        self.o: F = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: E = None
        self.t: F = None
        self.p: C = None
        self.u: G = None
        self.q: B = None
        self.y: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: E = None
        self.v: H = None
        self.z: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: I = None
        self.r: C = None
        self.w: H = None
        self.o: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.z: B = None
        self.t: D = None
        self.x: C = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: B = None
        self.y: C = None
        self.r: F = None
        self.t: D = None
        self.o: F = None
        self.w: F = None
        self.txt = txt

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

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