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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.q: C = None
        self.o: A = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: F = None
        self.r: E = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

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

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

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

m = A("m")
d = B("d")
a = C("a")
c = D("c")
k = E("k")
l = F("l")
b = F("b")

m.o = c
m.x = c
m.r = a
m.v = a
m.s = d
m.q = k
d.z = a
d.q = a
d.r = l
d.o = m
d.s = m
a.w = m
a.z = m
a.u = l
a.r = k
a.o = d
c.y = m
c.z = m
c.r = d
c.v = l
c.o = a
c.u = k
k.x = d
l.v = a
l.x = a
l.u = c
l.o = d
l.q = d
b.v = a
b.x = a
b.u = c
b.o = d
b.q = d
assert l.v.o.r.q.q.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.v: C = None
        self.x: D = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.q: C = None
        self.o: A = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: F = None
        self.r: E = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

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

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

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

m = A("m")
d = B("d")
a = C("a")
c = D("c")
k = E("k")
l = F("l")
b = F("b")

m.o = c
m.x = c
m.r = a
m.v = a
m.s = d
m.q = k
d.z = a
d.q = a
d.r = l
d.o = m
d.s = m
a.w = m
a.z = m
a.u = l
a.r = k
a.o = d
c.y = m
c.z = m
c.r = d
c.v = l
c.o = a
c.u = k
k.x = d
l.v = a
l.x = a
l.u = c
l.o = d
l.q = d
b.v = a
b.x = a
b.u = c
b.o = d
b.q = d
assert l.v.o.r.q.q.o.r.txt == "l"