class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: E = None
        self.t: D = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: B = None
        self.t: F = None
        self.v: A = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: G = None
        self.v: H = None
        self.x: D = None
        self.u: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.x: F = None
        self.t: C = None
        self.r: A = None
        self.q: B = None
        self.u: F = None
        self.v: B = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: B = None
        self.t: F = None
        self.v: A = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: G = None
        self.v: H = None
        self.x: D = None
        self.u: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.x: F = None
        self.t: C = None
        self.r: A = None
        self.q: B = None
        self.u: F = None
        self.v: B = None
        self.w: A = None
        self.txt = txt

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

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