class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: D = None
        self.u: I = None
        self.q: F = None
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: H = None
        self.q: J = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: B = None
        self.q: I = None
        self.o: F = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: J = None
        self.t: F = None
        self.r: F = None
        self.u: C = None
        self.o: C = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.x: G = None
        self.s: D = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: H = None
        self.q: J = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: B = None
        self.q: I = None
        self.o: F = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: J = None
        self.t: F = None
        self.r: F = None
        self.u: C = None
        self.o: C = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.x: G = None
        self.s: D = None
        self.w: D = None
        self.txt = txt

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

k.y = c
k.v = c
k.z = j
k.u = b
k.q = n
g.o = j
g.w = a
g.t = a
g.q = c
g.r = d
f.y = c
f.z = g
f.q = b
f.o = n
f.w = n
j.o = c
d.w = a
n.v = d
h.z = g
h.w = c
h.t = n
h.r = n
h.u = f
h.o = f
h.x = b
a.o = j
a.v = d
b.r = n
b.t = h
c.v = d
c.r = k
c.x = h
c.s = j
c.w = j
assert d.w.v.w.v.w.v.w.v.w.txt == "a"