class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: F = None
        self.t: D = None
        self.w: B = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: F = None
        self.u: A = None
        self.o: F = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.q: C = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: D = None
        self.txt = txt

e = A("e")
d = B("d")
f = C("f")
n = D("n")
k = E("k")
m = F("m")
b = F("b")
a = E("a")

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: F = None
        self.u: A = None
        self.o: F = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.q: C = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: D = None
        self.txt = txt

e = A("e")
d = B("d")
f = C("f")
n = D("n")
k = E("k")
m = F("m")
b = F("b")
a = E("a")

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