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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: B = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: E = None
        self.z: E = None
        self.y: J = None
        self.s: E = None
        self.x: A = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.u: G = None
        self.w: G = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: J = None
        self.p: A = None
        self.q: E = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: C = None
        self.w: F = None
        self.p: D = None
        self.s: F = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: B = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: E = None
        self.z: E = None
        self.y: J = None
        self.s: E = None
        self.x: A = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.u: G = None
        self.w: G = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: J = None
        self.p: A = None
        self.q: E = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: C = None
        self.w: F = None
        self.p: D = None
        self.s: F = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

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

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