class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.w: D = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.r: D = None
        self.z: D = None
        self.t: D = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: D = None
        self.v: B = None
        self.r: E = None
        self.s: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.z: F = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: D = None
        self.p: E = None
        self.u: H = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

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

n = A("n")
c = B("c")
f = C("f")
b = D("b")
i = E("i")
h = F("h")
j = G("j")
a = H("a")
e = C("e")
m = H("m")

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.r: D = None
        self.z: D = None
        self.t: D = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: D = None
        self.v: B = None
        self.r: E = None
        self.s: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.z: F = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: D = None
        self.p: E = None
        self.u: H = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

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

n = A("n")
c = B("c")
f = C("f")
b = D("b")
i = E("i")
h = F("h")
j = G("j")
a = H("a")
e = C("e")
m = H("m")

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