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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.u: C = None
        self.v: H = None
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.u: C = None
        self.v: H = None
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: D = None
        self.txt = txt

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

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

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