class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.w: F = None
        self.v: D = None
        self.x: E = None
        self.r: H = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: E = None
        self.p: F = None
        self.x: A = None
        self.o: E = None
        self.v: F = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: D = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.u: H = None
        self.r: B = None
        self.y: C = None
        self.o: C = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: G = None
        self.z: B = None
        self.q: G = None
        self.v: F = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: H = None
        self.z: F = None
        self.s: D = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: E = None
        self.p: F = None
        self.x: A = None
        self.o: E = None
        self.v: F = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: D = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.u: H = None
        self.r: B = None
        self.y: C = None
        self.o: C = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: G = None
        self.z: B = None
        self.q: G = None
        self.v: F = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: H = None
        self.z: F = None
        self.s: D = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

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

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