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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: C = None
        self.txt = txt

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

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

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