class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.w: C = None
        self.r: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: G = None
        self.v: A = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: C = None
        self.t: D = None
        self.z: C = None
        self.r: B = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: G = None
        self.v: A = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: C = None
        self.t: D = None
        self.z: C = None
        self.r: B = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

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

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