class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.u: J = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: I = None
        self.q: B = None
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

e.v = j
e.w = g
e.u = k
g.u = h
g.y = j
g.v = j
g.t = k
g.q = m
g.p = n
g.x = d
m.y = a
n.u = h
h.u = m
h.r = a
a.r = e
a.w = j
a.t = h
a.z = h
d.z = m
d.o = j
d.u = j
d.q = g
b.t = a
b.o = a
b.q = m
b.r = d
b.z = d
j.p = n
k.t = g
assert a.r.w.q.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.u: J = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: I = None
        self.q: B = None
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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