class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: C = None
        self.u: B = None
        self.w: D = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.o: I = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.x: G = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.q: F = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.r: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.z: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.o: I = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.x: G = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.q: F = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.r: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.z: A = None
        self.txt = txt

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

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

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