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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

e = A("e")
m = B("m")
n = C("n")
l = D("l")
a = E("a")
k = F("k")
h = B("h")
j = B("j")
f = F("f")
c = C("c")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

e = A("e")
m = B("m")
n = C("n")
l = D("l")
a = E("a")
k = F("k")
h = B("h")
j = B("j")
f = F("f")
c = C("c")

e.x = n
e.s = n
e.r = k
e.w = f
m.w = l
m.u = a
m.x = a
n.x = c
n.y = l
n.z = m
n.w = e
n.q = f
l.x = e
l.v = k
a.s = m
a.r = l
a.p = c
k.z = j
k.q = a
k.o = c
k.x = f
k.v = h
k.r = n
h.w = l
h.u = a
h.x = a
j.w = l
j.u = a
j.x = a
f.z = h
f.q = a
f.o = c
f.r = c
f.x = k
f.v = m
c.x = n
c.y = l
c.z = m
c.w = e
c.q = k
assert l.x.s.x.txt == "c"