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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: I = None
        self.y: D = None
        self.u: I = None
        self.w: G = None
        self.q: E = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: C = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: I = None
        self.y: D = None
        self.u: I = None
        self.w: G = None
        self.q: E = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: C = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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