class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: C = None
        self.q: G = None
        self.z: C = None
        self.o: B = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: H = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.v: D = None
        self.p: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: H = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.v: D = None
        self.p: C = None
        self.txt = txt

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

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