class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = 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.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: G = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: E = None
        self.u: D = None
        self.z: D = None
        self.t: D = None
        self.x: G = None
        self.txt = txt

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

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

i.v = d
i.q = k
j.v = i
a.r = k
d.o = g
d.q = g
d.w = e
d.y = f
d.r = j
d.s = i
d.v = a
d.u = k
n.u = i
n.v = f
n.p = j
n.z = j
n.q = j
n.s = j
n.t = j
n.y = g
n.w = a
k.r = e
k.o = f
k.z = i
f.t = e
g.s = j
g.v = n
g.u = d
g.z = d
g.t = d
g.x = f
e.x = k
m.u = i
m.v = f
m.p = j
m.z = j
m.q = j
m.s = j
m.t = j
m.y = g
m.w = a
assert n.w.r.z.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = 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.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: G = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: E = None
        self.u: D = None
        self.z: D = None
        self.t: D = None
        self.x: G = None
        self.txt = txt

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

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

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