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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.u: H = None
        self.o: I = None
        self.x: I = None
        self.s: B = None
        self.y: D = None
        self.t: E = None
        self.q: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.u: I = None
        self.x: C = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.x: C = None
        self.r: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.u: H = None
        self.o: I = None
        self.x: I = None
        self.s: B = None
        self.y: D = None
        self.t: E = None
        self.q: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.u: I = None
        self.x: C = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.x: C = None
        self.r: F = None
        self.txt = txt

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

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

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