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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: F = None
        self.x: G = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: J = None
        self.o: I = None
        self.u: J = None
        self.z: D = None
        self.q: E = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: C = None
        self.u: A = None
        self.z: D = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: A = None
        self.txt = txt

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

c.y = k
c.v = m
c.q = n
e.q = i
g.v = a
a.y = k
a.o = h
a.x = l
a.v = m
n.p = g
n.w = c
n.x = m
h.x = g
l.o = g
i.p = a
i.z = a
i.y = k
i.u = k
i.o = m
i.q = n
i.x = h
m.o = n
m.v = n
m.w = g
m.u = c
m.z = a
k.u = g
k.v = c
assert e.q.q.x.v.w.y.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: I = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: F = None
        self.x: G = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: J = None
        self.o: I = None
        self.u: J = None
        self.z: D = None
        self.q: E = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: C = None
        self.u: A = None
        self.z: D = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: A = None
        self.txt = txt

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

c.y = k
c.v = m
c.q = n
e.q = i
g.v = a
a.y = k
a.o = h
a.x = l
a.v = m
n.p = g
n.w = c
n.x = m
h.x = g
l.o = g
i.p = a
i.z = a
i.y = k
i.u = k
i.o = m
i.q = n
i.x = h
m.o = n
m.v = n
m.w = g
m.u = c
m.z = a
k.u = g
k.v = c
assert e.q.q.x.v.w.y.u.v.txt == "a"