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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.z: D = None
        self.v: E = None
        self.q: D = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: I = None
        self.s: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.z: D = None
        self.v: E = None
        self.q: D = None
        self.p: A = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: I = None
        self.s: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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