class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.w: F = None
        self.u: B = None
        self.t: E = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.u: B = None
        self.z: A = None
        self.r: D = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: B = None
        self.s: E = None
        self.o: E = None
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.u: B = None
        self.z: A = None
        self.r: D = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: B = None
        self.s: E = None
        self.o: E = None
        self.p: D = None
        self.txt = txt

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

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