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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: B = None
        self.q: A = None
        self.v: E = None
        self.t: E = None
        self.z: E = None
        self.o: H = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: H = None
        self.q: J = None
        self.u: A = None
        self.o: D = None
        self.x: J = None
        self.w: G = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: G = None
        self.r: D = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: B = None
        self.q: A = None
        self.v: E = None
        self.t: E = None
        self.z: E = None
        self.o: H = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: H = None
        self.q: J = None
        self.u: A = None
        self.o: D = None
        self.x: J = None
        self.w: G = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: G = None
        self.r: D = None
        self.o: G = None
        self.txt = txt

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

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