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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.o: B = None
        self.t: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.u: F = None
        self.y: D = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

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

n.v = j
e.w = a
e.q = b
b.z = e
b.o = a
j.w = b
j.x = b
j.r = n
j.v = n
j.s = a
c.r = n
c.x = a
c.o = e
c.z = e
c.t = b
l.v = d
l.z = d
l.u = d
l.y = j
l.x = n
l.q = c
d.v = l
d.z = l
d.u = l
d.y = j
d.x = n
d.q = c
a.r = n
a.x = c
a.o = e
a.z = e
a.t = b
assert a.x.t.z.q.o.r.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.o: B = None
        self.t: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.u: F = None
        self.y: D = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

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

n.v = j
e.w = a
e.q = b
b.z = e
b.o = a
j.w = b
j.x = b
j.r = n
j.v = n
j.s = a
c.r = n
c.x = a
c.o = e
c.z = e
c.t = b
l.v = d
l.z = d
l.u = d
l.y = j
l.x = n
l.q = c
d.v = l
d.z = l
d.u = l
d.y = j
d.x = n
d.q = c
a.r = n
a.x = c
a.o = e
a.z = e
a.t = b
assert a.x.t.z.q.o.r.v.v.txt == "n"