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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: H = None
        self.v: D = None
        self.s: E = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.t: I = None
        self.y: C = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: E = None
        self.y: G = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: D = None
        self.p: I = None
        self.r: F = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.t: B = None
        self.p: G = None
        self.x: C = None
        self.w: E = None
        self.q: B = None
        self.z: G = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: H = None
        self.v: D = None
        self.s: E = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.t: I = None
        self.y: C = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: E = None
        self.y: G = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: D = None
        self.p: I = None
        self.r: F = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.t: B = None
        self.p: G = None
        self.x: C = None
        self.w: E = None
        self.q: B = None
        self.z: G = None
        self.v: B = None
        self.txt = txt

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

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