class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.z: F = None
        self.x: A = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.w: D = None
        self.p: G = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.u: F = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: H = None
        self.s: H = None
        self.w: H = None
        self.txt = txt

g = A("g")
m = B("m")
a = C("a")
l = D("l")
i = E("i")
k = F("k")
e = G("e")
j = H("j")
f = G("f")
c = H("c")

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.z: F = None
        self.x: A = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.w: D = None
        self.p: G = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.u: F = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: H = None
        self.s: H = None
        self.w: H = None
        self.txt = txt

g = A("g")
m = B("m")
a = C("a")
l = D("l")
i = E("i")
k = F("k")
e = G("e")
j = H("j")
f = G("f")
c = H("c")

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