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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.s: A = None
        self.t: C = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: H = None
        self.x: G = None
        self.v: D = None
        self.y: G = None
        self.u: D = None
        self.z: D = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.p: G = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: I = None
        self.t: F = None
        self.q: F = None
        self.p: D = None
        self.w: C = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: C = None
        self.w: C = None
        self.o: G = None
        self.p: E = None
        self.s: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.z: C = None
        self.u: F = None
        self.x: C = None
        self.s: H = None
        self.p: F = None
        self.v: H = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.s: A = None
        self.t: C = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: H = None
        self.x: G = None
        self.v: D = None
        self.y: G = None
        self.u: D = None
        self.z: D = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.p: G = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: I = None
        self.t: F = None
        self.q: F = None
        self.p: D = None
        self.w: C = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: C = None
        self.w: C = None
        self.o: G = None
        self.p: E = None
        self.s: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.z: C = None
        self.u: F = None
        self.x: C = None
        self.s: H = None
        self.p: F = None
        self.v: H = None
        self.q: C = None
        self.txt = txt

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

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