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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: C = None
        self.r: G = None
        self.u: J = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: H = None
        self.q: J = None
        self.o: I = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: F = None
        self.p: F = None
        self.u: C = None
        self.r: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: C = None
        self.r: G = None
        self.u: J = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: H = None
        self.q: J = None
        self.o: I = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: F = None
        self.p: F = None
        self.u: C = None
        self.r: F = None
        self.z: F = None
        self.txt = txt

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

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

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