class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.p: D = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: A = None
        self.t: B = None
        self.p: F = None
        self.v: D = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: A = None
        self.u: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: D = None
        self.o: G = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.txt = txt

j = A("j")
e = B("e")
a = C("a")
i = D("i")
k = E("k")
c = F("c")
g = G("g")
h = B("h")
m = E("m")
b = A("b")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: A = None
        self.t: B = None
        self.p: F = None
        self.v: D = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: A = None
        self.u: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: D = None
        self.o: G = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.txt = txt

j = A("j")
e = B("e")
a = C("a")
i = D("i")
k = E("k")
c = F("c")
g = G("g")
h = B("h")
m = E("m")
b = A("b")

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