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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

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

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