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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

m = A("m")
f = B("f")
b = C("b")
k = D("k")
g = E("g")
d = F("d")
l = D("l")
e = A("e")
j = E("j")
a = F("a")

m.s = f
m.y = j
m.t = k
f.p = e
f.x = e
f.o = a
b.w = m
b.s = d
b.o = a
k.t = e
k.q = a
k.u = j
k.p = d
g.r = l
g.t = a
d.r = j
d.s = m
d.q = m
d.u = f
d.w = a
d.z = a
l.t = e
l.q = a
l.u = j
l.p = d
e.s = f
e.y = j
e.t = k
j.r = l
j.t = d
a.r = g
a.s = m
a.q = m
a.u = f
a.w = d
a.z = d
assert e.s.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: E = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

m = A("m")
f = B("f")
b = C("b")
k = D("k")
g = E("g")
d = F("d")
l = D("l")
e = A("e")
j = E("j")
a = F("a")

m.s = f
m.y = j
m.t = k
f.p = e
f.x = e
f.o = a
b.w = m
b.s = d
b.o = a
k.t = e
k.q = a
k.u = j
k.p = d
g.r = l
g.t = a
d.r = j
d.s = m
d.q = m
d.u = f
d.w = a
d.z = a
l.t = e
l.q = a
l.u = j
l.p = d
e.s = f
e.y = j
e.t = k
j.r = l
j.t = d
a.r = g
a.s = m
a.q = m
a.u = f
a.w = d
a.z = d
assert e.s.o.q.txt == "m"