class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: C = None
        self.x: D = None
        self.p: I = None
        self.y: A = None
        self.q: A = None
        self.z: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: J = None
        self.s: G = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: F = None
        self.u: E = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: B = None
        self.s: B = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.r: C = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: J = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: E = None
        self.v: B = None
        self.p: A = None
        self.z: G = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: C = None
        self.r: C = None
        self.txt = txt

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

e.q = g
e.v = l
d.t = g
d.w = j
d.v = j
d.x = m
d.z = m
d.p = a
d.y = e
d.q = e
j.u = e
j.t = f
j.s = g
j.p = n
j.o = d
m.y = j
m.q = c
m.x = c
m.o = c
m.u = n
n.z = a
n.w = d
n.s = d
n.v = e
c.v = m
c.u = j
c.r = j
c.t = g
g.t = m
g.v = f
g.z = d
l.p = e
a.u = j
a.w = n
a.v = d
a.p = e
a.z = g
a.y = c
f.p = c
f.y = j
f.r = j
assert a.w.z.u.t.y.t.r.u.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: C = None
        self.x: D = None
        self.p: I = None
        self.y: A = None
        self.q: A = None
        self.z: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: J = None
        self.s: G = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: F = None
        self.u: E = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: B = None
        self.s: B = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.r: C = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: J = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: E = None
        self.v: B = None
        self.p: A = None
        self.z: G = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: C = None
        self.r: C = None
        self.txt = txt

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

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