class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

n = A("n")
e = B("e")
f = C("f")
b = D("b")
c = E("c")
m = F("m")
d = G("d")
g = H("g")
i = G("i")
k = E("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

n = A("n")
e = B("e")
f = C("f")
b = D("b")
c = E("c")
m = F("m")
d = G("d")
g = H("g")
i = G("i")
k = E("k")

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