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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: F = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: F = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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