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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: A = None
        self.p: A = None
        self.q: E = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: C = None
        self.u: E = None
        self.q: J = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: H = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: G = None
        self.q: F = None
        self.o: I = None
        self.r: F = None
        self.s: F = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: A = None
        self.p: A = None
        self.q: E = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: C = None
        self.u: E = None
        self.q: J = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: H = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: G = None
        self.q: F = None
        self.o: I = None
        self.r: F = None
        self.s: F = None
        self.w: H = None
        self.txt = txt

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

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