class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: B = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: J = None
        self.r: D = None
        self.v: I = None
        self.y: E = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: J = None
        self.q: D = None
        self.x: E = None
        self.v: C = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: C = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: C = None
        self.q: D = None
        self.o: F = None
        self.w: E = None
        self.u: A = None
        self.v: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: J = None
        self.r: D = None
        self.v: I = None
        self.y: E = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: J = None
        self.q: D = None
        self.x: E = None
        self.v: C = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: C = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: C = None
        self.q: D = None
        self.o: F = None
        self.w: E = None
        self.u: A = None
        self.v: F = None
        self.txt = txt

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

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

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