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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: A = None
        self.w: C = None
        self.o: E = None
        self.y: A = None
        self.u: A = None
        self.t: F = None
        self.p: I = None
        self.s: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.x: E = None
        self.t: E = None
        self.v: I = None
        self.w: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: A = None
        self.w: C = None
        self.o: E = None
        self.y: A = None
        self.u: A = None
        self.t: F = None
        self.p: I = None
        self.s: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.x: E = None
        self.t: E = None
        self.v: I = None
        self.w: I = None
        self.txt = txt

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

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

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