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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: G = None
        self.v: J = None
        self.t: E = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.u: B = None
        self.v: H = None
        self.o: B = None
        self.q: B = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: H = None
        self.y: J = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: I = None
        self.p: F = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: H = None
        self.u: G = None
        self.v: H = None
        self.w: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: G = None
        self.v: J = None
        self.t: E = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.u: B = None
        self.v: H = None
        self.o: B = None
        self.q: B = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: H = None
        self.y: J = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: I = None
        self.p: F = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: H = None
        self.u: G = None
        self.v: H = None
        self.w: J = None
        self.txt = txt

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

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

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