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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: E = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: I = None
        self.t: D = None
        self.q: D = None
        self.s: H = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: E = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: I = None
        self.t: D = None
        self.q: D = None
        self.s: H = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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