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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.o: D = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: A = None
        self.v: I = None
        self.y: H = None
        self.w: B = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.q: D = None
        self.z: C = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.z: A = None
        self.p: H = None
        self.u: C = None
        self.v: E = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: E = None
        self.o: D = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: A = None
        self.v: I = None
        self.y: H = None
        self.w: B = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.q: D = None
        self.z: C = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.z: A = None
        self.p: H = None
        self.u: C = None
        self.v: E = None
        self.t: E = None
        self.txt = txt

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

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