class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: C = None
        self.x: D = None
        self.q: D = None
        self.r: H = None
        self.t: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: B = None
        self.t: J = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

a = A("a")
c = B("c")
g = C("g")
l = D("l")
e = E("e")
b = F("b")
j = G("j")
n = H("n")
i = I("i")
h = J("h")

a.z = h
a.v = g
a.x = l
a.q = l
a.r = n
a.t = i
c.y = l
g.z = e
g.q = e
g.s = a
g.y = a
g.r = b
g.v = n
g.w = j
l.u = n
l.x = c
e.z = h
e.t = h
e.x = c
e.o = c
e.y = n
b.x = j
j.y = i
j.z = a
j.v = e
n.v = l
i.o = j
i.y = g
i.s = g
i.t = g
i.u = n
i.v = n
i.x = e
i.z = a
i.p = b
i.r = l
h.p = l
assert a.v.y.z.p.u.v.x.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: C = None
        self.x: D = None
        self.q: D = None
        self.r: H = None
        self.t: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: B = None
        self.t: J = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

a = A("a")
c = B("c")
g = C("g")
l = D("l")
e = E("e")
b = F("b")
j = G("j")
n = H("n")
i = I("i")
h = J("h")

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