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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: E = None
        self.w: A = None
        self.o: G = None
        self.t: H = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: F = None
        self.q: H = None
        self.y: D = None
        self.v: D = None
        self.u: F = None
        self.x: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: E = None
        self.w: A = None
        self.o: G = None
        self.t: H = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: F = None
        self.q: H = None
        self.y: D = None
        self.v: D = None
        self.u: F = None
        self.x: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.txt = txt

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

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