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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.x: D = None
        self.t: H = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: G = None
        self.w: E = None
        self.u: G = None
        self.o: F = None
        self.q: E = None
        self.x: A = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.x: D = None
        self.t: H = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: G = None
        self.w: E = None
        self.u: G = None
        self.o: F = None
        self.q: E = None
        self.x: A = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.x: H = None
        self.txt = txt

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

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