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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.q: C = None
        self.y: D = None
        self.u: D = None
        self.r: H = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.v: D = None
        self.p: B = None
        self.r: I = None
        self.w: A = None
        self.u: I = None
        self.txt = txt

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

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

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

c.t = b
l.s = g
l.t = b
l.z = i
d.z = e
k.t = d
j.r = b
j.s = c
j.t = c
j.p = g
j.z = d
n.v = c
n.w = i
n.y = i
n.u = i
n.q = d
n.r = e
n.o = b
g.z = c
g.s = c
g.w = c
g.v = i
g.p = l
g.r = b
g.u = b
e.q = n
e.t = d
e.r = b
e.v = c
e.p = g
b.p = g
b.t = e
i.t = d
assert d.z.v.t.p.u.t.p.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.q: C = None
        self.y: D = None
        self.u: D = None
        self.r: H = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.v: D = None
        self.p: B = None
        self.r: I = None
        self.w: A = None
        self.u: I = None
        self.txt = txt

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

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

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

c.t = b
l.s = g
l.t = b
l.z = i
d.z = e
k.t = d
j.r = b
j.s = c
j.t = c
j.p = g
j.z = d
n.v = c
n.w = i
n.y = i
n.u = i
n.q = d
n.r = e
n.o = b
g.z = c
g.s = c
g.w = c
g.v = i
g.p = l
g.r = b
g.u = b
e.q = n
e.t = d
e.r = b
e.v = c
e.p = g
b.p = g
b.t = e
i.t = d
assert d.z.v.t.p.u.t.p.v.t.txt == "d"