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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.y: F = None
        self.p: F = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: B = None
        self.z: H = None
        self.p: C = None
        self.x: A = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: G = None
        self.z: H = None
        self.x: C = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.y: F = None
        self.p: F = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: B = None
        self.z: H = None
        self.p: C = None
        self.x: A = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: G = None
        self.z: H = None
        self.x: C = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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