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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: A = None
        self.t: B = None
        self.y: D = None
        self.s: J = None
        self.v: B = None
        self.z: H = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: I = None
        self.s: D = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: A = None
        self.t: B = None
        self.y: D = None
        self.s: J = None
        self.v: B = None
        self.z: H = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: I = None
        self.s: D = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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