class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: D = None
        self.t: E = 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.u: A = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: J = None
        self.p: G = None
        self.u: G = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

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

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

a.y = f
a.s = m
a.t = g
e.r = l
l.u = a
l.p = d
m.x = d
m.p = d
m.u = d
m.t = n
m.v = f
m.y = e
g.u = e
g.z = f
f.t = m
d.o = l
d.w = f
d.u = n
i.y = e
i.o = f
k.s = i
k.y = g
k.p = f
n.r = g
n.z = e
n.x = m
n.y = a
assert m.x.o.u.s.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: D = None
        self.t: E = 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.u: A = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: J = None
        self.p: G = None
        self.u: G = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

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

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

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