class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.s: H = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.s: E = None
        self.p: B = None
        self.u: H = None
        self.t: G = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: E = None
        self.s: E = None
        self.v: H = None
        self.u: E = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: C = None
        self.p: A = None
        self.q: F = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: D = None
        self.w: G = None
        self.z: D = None
        self.o: A = None
        self.q: A = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: C = None
        self.r: B = None
        self.v: G = None
        self.s: D = None
        self.q: C = None
        self.txt = txt

g = A("g")
a = B("a")
n = C("n")
l = D("l")
j = E("j")
h = F("h")
i = G("i")
k = H("k")
b = G("b")
m = F("m")

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.s: H = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.s: E = None
        self.p: B = None
        self.u: H = None
        self.t: G = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: E = None
        self.s: E = None
        self.v: H = None
        self.u: E = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: C = None
        self.p: A = None
        self.q: F = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: D = None
        self.w: G = None
        self.z: D = None
        self.o: A = None
        self.q: A = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: C = None
        self.r: B = None
        self.v: G = None
        self.s: D = None
        self.q: C = None
        self.txt = txt

g = A("g")
a = B("a")
n = C("n")
l = D("l")
j = E("j")
h = F("h")
i = G("i")
k = H("k")
b = G("b")
m = F("m")

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