class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: H = None
        self.x: G = None
        self.y: F = None
        self.o: F = None
        self.z: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: I = None
        self.y: E = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.s: I = None
        self.p: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: H = None
        self.x: G = None
        self.y: F = None
        self.o: F = None
        self.z: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: I = None
        self.y: E = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.s: I = None
        self.p: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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