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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.t: D = None
        self.o: B = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.t: D = None
        self.o: B = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

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

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