class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: G = None
        self.r: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: E = None
        self.r: I = None
        self.y: H = None
        self.t: D = None
        self.z: I = None
        self.x: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: A = None
        self.w: E = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: D = None
        self.w: F = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: G = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: E = None
        self.r: I = None
        self.y: H = None
        self.t: D = None
        self.z: I = None
        self.x: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: A = None
        self.w: E = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: D = None
        self.w: F = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: G = None
        self.x: F = None
        self.txt = txt

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

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

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