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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: F = None
        self.r: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.y: G = None
        self.u: C = None
        self.r: E = None
        self.q: A = None
        self.t: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: F = None
        self.r: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.y: G = None
        self.u: C = None
        self.r: E = None
        self.q: A = None
        self.t: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.txt = txt

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

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