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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: J = None
        self.o: I = None
        self.p: I = None
        self.v: A = None
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.u: J = None
        self.y: F = None
        self.p: G = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.y: A = None
        self.v: A = None
        self.u: B = None
        self.p: C = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: J = None
        self.o: I = None
        self.p: I = None
        self.v: A = None
        self.u: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.u: J = None
        self.y: F = None
        self.p: G = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.y: A = None
        self.v: A = None
        self.u: B = None
        self.p: C = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

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

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