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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: H = None
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: J = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

d.q = c
d.u = c
d.z = a
d.p = a
d.t = a
d.w = b
d.x = f
d.r = g
d.v = h
n.t = d
n.v = d
n.w = d
n.u = f
n.y = f
n.s = h
n.r = c
n.x = e
g.o = h
g.x = f
g.z = a
g.q = e
a.w = k
a.o = k
a.p = e
f.r = a
f.s = a
f.v = d
k.x = n
k.z = h
k.t = g
e.t = a
e.v = b
e.o = b
e.y = h
e.q = n
e.s = n
e.z = f
e.x = k
h.z = n
b.s = f
b.x = c
b.v = e
c.w = b
assert g.o.z.r.w.v.x.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: D = None
        self.w: I = None
        self.p: D = None
        self.u: J = None
        self.x: E = None
        self.t: D = None
        self.r: C = None
        self.v: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: H = None
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: J = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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