class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: F = None
        self.z: I = None
        self.r: H = None
        self.x: G = None
        self.u: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: I = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: J = None
        self.q: A = None
        self.u: B = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

i = A("i")
m = B("m")
k = C("k")
d = D("d")
j = E("j")
a = F("a")
l = G("l")
h = H("h")
n = I("n")
g = J("g")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: I = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: J = None
        self.q: A = None
        self.u: B = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

i = A("i")
m = B("m")
k = C("k")
d = D("d")
j = E("j")
a = F("a")
l = G("l")
h = H("h")
n = I("n")
g = J("g")

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