class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: H = None
        self.y: G = None
        self.v: A = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: G = None
        self.z: E = None
        self.r: H = None
        self.t: H = None
        self.q: C = None
        self.o: H = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: G = None
        self.r: G = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: H = None
        self.y: G = None
        self.v: A = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: G = None
        self.z: E = None
        self.r: H = None
        self.t: H = None
        self.q: C = None
        self.o: H = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: G = None
        self.r: G = None
        self.z: E = None
        self.txt = txt

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

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

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