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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: D = None
        self.t: F = None
        self.r: A = None
        self.u: E = None
        self.y: I = None
        self.z: D = None
        self.s: I = None
        self.v: F = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: E = None
        self.v: G = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: J = None
        self.s: G = None
        self.p: E = None
        self.u: A = None
        self.v: B = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.s: B = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: I = None
        self.t: H = None
        self.z: H = None
        self.p: D = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.w: D = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.v: C = None
        self.r: A = None
        self.s: A = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: D = None
        self.t: F = None
        self.r: A = None
        self.u: E = None
        self.y: I = None
        self.z: D = None
        self.s: I = None
        self.v: F = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: E = None
        self.v: G = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: J = None
        self.s: G = None
        self.p: E = None
        self.u: A = None
        self.v: B = None
        self.z: A = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.s: B = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: I = None
        self.t: H = None
        self.z: H = None
        self.p: D = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.w: D = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.v: C = None
        self.r: A = None
        self.s: A = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

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

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