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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: F = None
        self.s: A = None
        self.x: H = None
        self.r: B = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

g = A("g")
k = B("k")
a = C("a")
m = D("m")
e = E("e")
d = F("d")
j = G("j")
h = H("h")
n = F("n")
f = B("f")

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: F = None
        self.s: A = None
        self.x: H = None
        self.r: B = None
        self.w: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

g = A("g")
k = B("k")
a = C("a")
m = D("m")
e = E("e")
d = F("d")
j = G("j")
h = H("h")
n = F("n")
f = B("f")

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