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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.y: G = None
        self.w: F = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.y: G = None
        self.w: F = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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