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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.w: E = None
        self.v: E = None
        self.q: D = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: E = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.w: E = None
        self.v: E = None
        self.q: D = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: E = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

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

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