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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

i = A("i")
m = B("m")
j = C("j")
n = D("n")
k = E("k")
g = F("g")
d = F("d")
e = A("e")
b = A("b")

i.u = k
i.r = e
i.z = m
i.o = b
i.q = d
m.x = j
m.w = j
m.t = k
m.r = d
j.w = k
j.s = m
j.r = m
j.o = m
j.q = e
n.o = m
n.p = e
n.x = d
n.u = i
k.w = n
g.v = m
g.p = d
g.s = k
d.v = m
d.p = g
d.s = k
e.u = k
e.r = b
e.z = m
e.o = i
e.q = d
b.u = k
b.r = e
b.z = m
b.o = i
b.q = g
assert j.r.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.z: B = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

i = A("i")
m = B("m")
j = C("j")
n = D("n")
k = E("k")
g = F("g")
d = F("d")
e = A("e")
b = A("b")

i.u = k
i.r = e
i.z = m
i.o = b
i.q = d
m.x = j
m.w = j
m.t = k
m.r = d
j.w = k
j.s = m
j.r = m
j.o = m
j.q = e
n.o = m
n.p = e
n.x = d
n.u = i
k.w = n
g.v = m
g.p = d
g.s = k
d.v = m
d.p = g
d.s = k
e.u = k
e.r = b
e.z = m
e.o = i
e.q = d
b.u = k
b.r = e
b.z = m
b.o = i
b.q = g
assert j.r.x.s.txt == "m"