class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: E = None
        self.o: F = None
        self.v: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.x: D = None
        self.y: D = None
        self.v: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.x: D = None
        self.y: D = None
        self.v: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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