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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: H = None
        self.w: J = None
        self.x: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: B = None
        self.s: D = None
        self.t: A = None
        self.y: B = None
        self.r: D = None
        self.p: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: E = None
        self.x: A = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.t: A = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: I = None
        self.p: A = None
        self.o: H = None
        self.s: F = None
        self.t: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: H = None
        self.w: J = None
        self.x: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: B = None
        self.s: D = None
        self.t: A = None
        self.y: B = None
        self.r: D = None
        self.p: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: E = None
        self.x: A = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.t: A = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: I = None
        self.p: A = None
        self.o: H = None
        self.s: F = None
        self.t: H = None
        self.txt = txt

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

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