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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: C = None
        self.p: E = None
        self.q: F = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: A = None
        self.r: A = None
        self.t: B = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: E = None
        self.w: B = None
        self.o: A = None
        self.y: C = None
        self.q: B = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: C = None
        self.p: E = None
        self.q: F = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: A = None
        self.r: A = None
        self.t: B = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: E = None
        self.w: B = None
        self.o: A = None
        self.y: C = None
        self.q: B = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

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