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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: I = None
        self.u: F = None
        self.x: G = None
        self.y: F = None
        self.o: A = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: G = None
        self.o: E = None
        self.v: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: D = None
        self.w: H = None
        self.y: E = None
        self.p: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: I = None
        self.u: F = None
        self.x: G = None
        self.y: F = None
        self.o: A = None
        self.t: H = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: G = None
        self.o: E = None
        self.v: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: D = None
        self.w: H = None
        self.y: E = None
        self.p: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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