class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.w: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.x: E = None
        self.t: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: A = None
        self.v: C = None
        self.r: B = None
        self.txt = txt

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

m.z = k
n.t = a
n.y = a
n.x = m
n.z = m
n.w = m
n.u = h
n.r = h
n.q = k
n.v = c
d.x = h
d.q = h
d.t = j
d.o = n
d.r = n
d.y = m
d.z = m
d.w = k
j.p = g
j.z = n
j.x = n
j.y = d
j.v = a
g.t = j
g.y = c
g.w = i
h.u = d
c.o = n
c.r = d
c.t = d
c.x = i
k.t = j
k.u = c
a.x = c
a.o = m
a.v = d
a.r = n
i.t = j
i.y = c
i.w = g
assert g.y.x.t.x.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.w: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.x: E = None
        self.t: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: A = None
        self.v: C = None
        self.r: B = None
        self.txt = txt

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

m.z = k
n.t = a
n.y = a
n.x = m
n.z = m
n.w = m
n.u = h
n.r = h
n.q = k
n.v = c
d.x = h
d.q = h
d.t = j
d.o = n
d.r = n
d.y = m
d.z = m
d.w = k
j.p = g
j.z = n
j.x = n
j.y = d
j.v = a
g.t = j
g.y = c
g.w = i
h.u = d
c.o = n
c.r = d
c.t = d
c.x = i
k.t = j
k.u = c
a.x = c
a.o = m
a.v = d
a.r = n
i.t = j
i.y = c
i.w = g
assert g.y.x.t.x.q.u.txt == "c"