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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: B = None
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.x: G = None
        self.t: B = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.w: E = None
        self.txt = txt

f = A("f")
k = B("k")
n = C("n")
l = D("l")
a = E("a")
e = F("e")
b = G("b")
c = E("c")

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: B = None
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.x: G = None
        self.t: B = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.w: E = None
        self.txt = txt

f = A("f")
k = B("k")
n = C("n")
l = D("l")
a = E("a")
e = F("e")
b = G("b")
c = E("c")

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