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

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

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.w: E = None
        self.q: D = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.z: C = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.w: E = None
        self.q: D = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.z: C = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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