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

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

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

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

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

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

n = A("n")
a = B("a")
k = C("k")
f = D("f")
j = E("j")
g = F("g")
e = B("e")
l = D("l")
c = A("c")
d = A("d")

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

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

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

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

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

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

n = A("n")
a = B("a")
k = C("k")
f = D("f")
j = E("j")
g = F("g")
e = B("e")
l = D("l")
c = A("c")
d = A("d")

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