class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: H = None
        self.t: E = None
        self.s: H = None
        self.q: E = None
        self.w: E = None
        self.z: I = None
        self.p: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: G = None
        self.o: C = None
        self.s: B = None
        self.w: I = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: A = None
        self.p: G = None
        self.q: C = None
        self.z: E = None
        self.u: I = None
        self.o: H = None
        self.w: I = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: F = None
        self.s: F = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: G = None
        self.v: F = None
        self.y: E = None
        self.p: H = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: G = None
        self.o: C = None
        self.s: B = None
        self.w: I = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: A = None
        self.p: G = None
        self.q: C = None
        self.z: E = None
        self.u: I = None
        self.o: H = None
        self.w: I = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: F = None
        self.s: F = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: G = None
        self.v: F = None
        self.y: E = None
        self.p: H = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

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