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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: G = None
        self.z: H = None
        self.x: H = None
        self.u: G = None
        self.t: A = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: G = None
        self.u: J = None
        self.o: G = None
        self.t: E = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: D = None
        self.x: H = None
        self.w: B = None
        self.z: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: F = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: G = None
        self.z: H = None
        self.x: H = None
        self.u: G = None
        self.t: A = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: G = None
        self.u: J = None
        self.o: G = None
        self.t: E = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: D = None
        self.x: H = None
        self.w: B = None
        self.z: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: F = None
        self.p: G = None
        self.w: D = None
        self.txt = txt

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

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

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