class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: B = None
        self.r: B = None
        self.u: G = None
        self.v: F = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.p: D = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.p: D = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

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

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