class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: E = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: D = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.o: G = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: E = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: D = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.o: G = None
        self.y: D = None
        self.txt = txt

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

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