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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: H = None
        self.q: A = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.u: B = None
        self.o: D = None
        self.s: E = None
        self.p: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.q: B = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

e = A("e")
g = B("g")
i = C("i")
h = D("h")
l = E("l")
a = F("a")
k = G("k")
f = H("f")
j = B("j")
m = B("m")

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: H = None
        self.q: A = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.u: B = None
        self.o: D = None
        self.s: E = None
        self.p: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.q: B = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

e = A("e")
g = B("g")
i = C("i")
h = D("h")
l = E("l")
a = F("a")
k = G("k")
f = H("f")
j = B("j")
m = B("m")

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