class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: C = None
        self.z: C = None
        self.t: H = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.q: F = None
        self.x: E = None
        self.o: D = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.z: E = None
        self.s: G = None
        self.u: E = None
        self.r: E = None
        self.q: B = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: D = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: A = None
        self.x: A = None
        self.z: C = None
        self.o: C = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

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

f = A("f")
k = B("k")
c = C("c")
l = D("l")
h = E("h")
d = F("d")
m = G("m")
a = H("a")
b = G("b")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.q: F = None
        self.x: E = None
        self.o: D = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.z: E = None
        self.s: G = None
        self.u: E = None
        self.r: E = None
        self.q: B = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: D = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: A = None
        self.x: A = None
        self.z: C = None
        self.o: C = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

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

f = A("f")
k = B("k")
c = C("c")
l = D("l")
h = E("h")
d = F("d")
m = G("m")
a = H("a")
b = G("b")

f.v = a
f.t = a
f.w = c
f.z = c
f.q = h
k.p = d
k.q = d
k.s = f
k.x = h
k.o = l
k.z = c
c.q = k
l.v = h
l.z = h
l.u = h
l.r = h
l.w = c
l.s = b
l.q = k
l.p = m
h.x = a
h.z = a
h.w = l
d.p = a
d.u = f
d.x = f
d.z = c
d.o = c
d.t = l
m.q = l
m.x = k
m.r = b
a.x = b
a.v = m
a.p = h
a.z = k
b.q = l
b.x = k
b.r = m
assert l.u.w.w.q.s.q.z.x.txt == "b"