class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.v: C = None
        self.r: C = None
        self.w: B = None
        self.t: H = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.p: F = None
        self.w: G = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.q: C = None
        self.x: D = None
        self.r: F = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.q: E = None
        self.r: B = None
        self.z: C = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.x: F = None
        self.p: A = None
        self.w: C = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.p: F = None
        self.w: G = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.q: C = None
        self.x: D = None
        self.r: F = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.q: E = None
        self.r: B = None
        self.z: C = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.x: F = None
        self.p: A = None
        self.w: C = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

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

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