class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.v: B = None
        self.q: C = None
        self.s: E = None
        self.y: C = None
        self.z: G = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.o: A = None
        self.x: B = None
        self.v: A = None
        self.u: E = None
        self.t: A = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.t: D = None
        self.q: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.z: H = None
        self.y: D = None
        self.txt = txt

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

g = A("g")
b = B("b")
e = C("e")
f = D("f")
h = E("h")
a = F("a")
i = G("i")
n = H("n")
j = D("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.o: A = None
        self.x: B = None
        self.v: A = None
        self.u: E = None
        self.t: A = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.t: D = None
        self.q: B = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.z: H = None
        self.y: D = None
        self.txt = txt

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

g = A("g")
b = B("b")
e = C("e")
f = D("f")
h = E("h")
a = F("a")
i = G("i")
n = H("n")
j = D("j")

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