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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: B = None
        self.y: C = None
        self.r: C = None
        self.o: B = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: C = None
        self.x: B = None
        self.p: C = None
        self.z: B = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: B = None
        self.y: C = None
        self.r: C = None
        self.o: B = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: C = None
        self.x: B = None
        self.p: C = None
        self.z: B = None
        self.w: G = None
        self.txt = txt

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

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