class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.s: J = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.p: F = None
        self.q: J = None
        self.w: I = None
        self.z: A = None
        self.o: I = None
        self.r: D = None
        self.y: E = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.s: J = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.p: F = None
        self.q: J = None
        self.w: I = None
        self.z: A = None
        self.o: I = None
        self.r: D = None
        self.y: E = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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