class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: I = None
        self.v: B = None
        self.w: F = None
        self.o: G = None
        self.x: F = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: A = None
        self.r: G = None
        self.q: F = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.o: E = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.p: F = None
        self.q: F = None
        self.o: C = None
        self.z: G = None
        self.y: G = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.z: A = None
        self.r: E = None
        self.p: A = None
        self.y: F = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: A = None
        self.r: G = None
        self.q: F = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.o: E = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.p: F = None
        self.q: F = None
        self.o: C = None
        self.z: G = None
        self.y: G = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.z: A = None
        self.r: E = None
        self.p: A = None
        self.y: F = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

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

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

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