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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.w: C = None
        self.s: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.w: C = None
        self.s: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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