class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.x: G = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.v: A = None
        self.txt = txt

n = A("n")
l = B("l")
c = C("c")
g = D("g")
m = E("m")
b = F("b")
h = G("h")
j = H("j")
f = G("f")
d = F("d")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.v: A = None
        self.txt = txt

n = A("n")
l = B("l")
c = C("c")
g = D("g")
m = E("m")
b = F("b")
h = G("h")
j = H("j")
f = G("f")
d = F("d")

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