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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.s: B = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: E = None
        self.v: A = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.s: B = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: E = None
        self.v: A = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

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

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