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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: G = None
        self.q: G = None
        self.v: I = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: F = None
        self.p: B = None
        self.y: B = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.t: C = None
        self.y: B = None
        self.v: J = None
        self.z: H = None
        self.w: I = None
        self.s: J = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: J = None
        self.r: G = None
        self.o: D = None
        self.z: E = None
        self.q: I = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: G = None
        self.q: G = None
        self.v: I = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: F = None
        self.p: B = None
        self.y: B = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.t: C = None
        self.y: B = None
        self.v: J = None
        self.z: H = None
        self.w: I = None
        self.s: J = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: J = None
        self.r: G = None
        self.o: D = None
        self.z: E = None
        self.q: I = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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