class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: B = None
        self.o: B = None
        self.r: H = None
        self.z: C = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: A = None
        self.s: H = None
        self.r: E = None
        self.v: B = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: I = None
        self.t: C = None
        self.y: A = None
        self.x: I = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: A = None
        self.s: H = None
        self.r: E = None
        self.v: B = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: I = None
        self.t: C = None
        self.y: A = None
        self.x: I = None
        self.v: I = None
        self.txt = txt

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

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

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

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