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

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

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: A = None
        self.q: E = None
        self.w: H = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.t: F = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: J = None
        self.r: E = None
        self.u: J = None
        self.w: F = None
        self.p: E = None
        self.x: D = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: F = None
        self.s: B = None
        self.x: G = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: A = None
        self.q: E = None
        self.w: H = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.t: F = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: J = None
        self.r: E = None
        self.u: J = None
        self.w: F = None
        self.p: E = None
        self.x: D = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: F = None
        self.s: B = None
        self.x: G = None
        self.w: G = None
        self.txt = txt

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

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