class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: H = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.q: D = None
        self.u: I = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: D = None
        self.t: F = None
        self.q: J = None
        self.o: G = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: J = None
        self.t: C = None
        self.r: B = None
        self.s: G = None
        self.w: E = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: H = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: G = None
        self.o: B = None
        self.r: G = None
        self.w: F = None
        self.v: D = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.q: D = None
        self.u: I = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: D = None
        self.t: F = None
        self.q: J = None
        self.o: G = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: J = None
        self.t: C = None
        self.r: B = None
        self.s: G = None
        self.w: E = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: H = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: G = None
        self.o: B = None
        self.r: G = None
        self.w: F = None
        self.v: D = None
        self.z: G = None
        self.txt = txt

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

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