class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.s: E = None
        self.v: C = None
        self.r: E = None
        self.y: E = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.s: E = None
        self.v: C = None
        self.r: E = None
        self.y: E = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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