class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: B = None
        self.t: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.o: E = None
        self.z: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.z: I = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.t: A = None
        self.o: G = None
        self.u: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.o: E = None
        self.z: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.z: I = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.t: A = None
        self.o: G = None
        self.u: B = None
        self.v: C = None
        self.txt = txt

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

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

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