class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: B = None
        self.r: G = None
        self.u: A = None
        self.y: A = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: B = None
        self.r: G = None
        self.u: A = None
        self.y: A = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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