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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: H = None
        self.v: F = None
        self.s: B = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.r: E = None
        self.z: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: H = None
        self.v: F = None
        self.s: B = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.r: E = None
        self.z: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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