class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.p: B = None
        self.u: C = None
        self.v: E = None
        self.q: D = None
        self.y: H = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: C = None
        self.u: F = None
        self.p: F = None
        self.y: C = None
        self.s: C = None
        self.q: F = None
        self.o: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.t: G = None
        self.q: G = None
        self.o: E = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.o: A = None
        self.u: B = None
        self.z: C = None
        self.w: A = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: C = None
        self.u: F = None
        self.p: F = None
        self.y: C = None
        self.s: C = None
        self.q: F = None
        self.o: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.t: G = None
        self.q: G = None
        self.o: E = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.o: A = None
        self.u: B = None
        self.z: C = None
        self.w: A = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

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

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

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