class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: G = None
        self.o: D = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: I = None
        self.q: H = None
        self.z: E = None
        self.p: G = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: I = None
        self.r: C = None
        self.p: C = None
        self.s: C = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: A = None
        self.w: F = None
        self.y: E = None
        self.v: I = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.o: G = None
        self.u: F = None
        self.q: E = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.y: D = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: I = None
        self.q: H = None
        self.z: E = None
        self.p: G = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: I = None
        self.r: C = None
        self.p: C = None
        self.s: C = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: A = None
        self.w: F = None
        self.y: E = None
        self.v: I = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.o: G = None
        self.u: F = None
        self.q: E = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.y: D = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

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

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