class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: I = None
        self.r: E = None
        self.w: E = None
        self.x: I = None
        self.y: A = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.r: H = None
        self.z: C = None
        self.v: E = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: D = None
        self.p: D = None
        self.w: E = None
        self.v: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: I = None
        self.r: E = None
        self.w: E = None
        self.x: I = None
        self.y: A = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.r: H = None
        self.z: C = None
        self.v: E = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: D = None
        self.p: D = None
        self.w: E = None
        self.v: G = None
        self.txt = txt

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

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