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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: E = None
        self.q: I = None
        self.r: I = None
        self.t: A = None
        self.s: G = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: I = None
        self.q: F = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.p: A = None
        self.q: F = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: C = None
        self.r: C = None
        self.p: E = None
        self.w: F = None
        self.q: F = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: E = None
        self.q: I = None
        self.r: I = None
        self.t: A = None
        self.s: G = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: I = None
        self.q: F = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.p: A = None
        self.q: F = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: C = None
        self.r: C = None
        self.p: E = None
        self.w: F = None
        self.q: F = None
        self.v: I = None
        self.txt = txt

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

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

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