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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.z: C = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: A = None
        self.v: C = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

l = A("l")
f = B("f")
i = C("i")
b = D("b")
e = E("e")
d = F("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.z: C = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: A = None
        self.v: C = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

l = A("l")
f = B("f")
i = C("i")
b = D("b")
e = E("e")
d = F("d")

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