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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: J = None
        self.s: I = None
        self.r: H = None
        self.x: I = None
        self.v: G = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: B = None
        self.x: J = None
        self.v: E = None
        self.y: F = None
        self.w: B = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: D = None
        self.o: E = None
        self.w: E = None
        self.r: H = None
        self.p: B = None
        self.t: E = None
        self.z: E = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: J = None
        self.s: I = None
        self.r: H = None
        self.x: I = None
        self.v: G = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: B = None
        self.x: J = None
        self.v: E = None
        self.y: F = None
        self.w: B = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: D = None
        self.o: E = None
        self.w: E = None
        self.r: H = None
        self.p: B = None
        self.t: E = None
        self.z: E = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: H = None
        self.txt = txt

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

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