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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: I = None
        self.r: A = None
        self.o: G = None
        self.v: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: D = None
        self.o: D = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: I = None
        self.r: A = None
        self.o: G = None
        self.v: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: D = None
        self.o: D = None
        self.p: C = None
        self.txt = txt

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

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

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

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