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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.v: H = None
        self.u: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.v: H = None
        self.u: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

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