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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: H = None
        self.o: E = None
        self.p: I = None
        self.s: F = None
        self.z: B = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: H = None
        self.o: F = None
        self.s: E = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: H = None
        self.o: E = None
        self.p: I = None
        self.s: F = None
        self.z: B = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: H = None
        self.o: F = None
        self.s: E = None
        self.u: F = None
        self.txt = txt

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

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