class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.s: B = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: J = None
        self.t: E = None
        self.o: A = None
        self.q: A = None
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: D = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: I = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: J = None
        self.t: E = None
        self.o: A = None
        self.q: A = None
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: D = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: I = None
        self.u: F = None
        self.txt = txt

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

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