class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: H = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: F = None
        self.r: D = None
        self.t: H = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: F = None
        self.r: D = None
        self.t: H = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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

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

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