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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.p: A = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.u: A = None
        self.y: D = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

d = A("d")
l = B("l")
n = C("n")
i = D("i")
g = E("g")
a = F("a")

d.w = a
d.r = a
d.z = i
d.y = l
l.u = n
l.o = n
l.v = g
l.y = d
l.s = d
n.q = d
i.w = l
i.o = l
i.y = l
i.u = a
i.p = d
g.o = n
a.o = i
a.y = i
a.p = i
a.r = l
a.u = d
a.t = d
assert a.r.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: D = None
        self.r: F = None
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.p: A = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.u: A = None
        self.y: D = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

d = A("d")
l = B("l")
n = C("n")
i = D("i")
g = E("g")
a = F("a")

d.w = a
d.r = a
d.z = i
d.y = l
l.u = n
l.o = n
l.v = g
l.y = d
l.s = d
n.q = d
i.w = l
i.o = l
i.y = l
i.u = a
i.p = d
g.o = n
a.o = i
a.y = i
a.p = i
a.r = l
a.u = d
a.t = d
assert a.r.y.y.txt == "l"