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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.o: G = None
        self.q: C = None
        self.r: D = None
        self.t: D = None
        self.y: I = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: I = None
        self.z: A = None
        self.v: B = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: C = None
        self.z: I = None
        self.r: G = None
        self.t: G = None
        self.o: A = None
        self.s: I = None
        self.y: E = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.v: D = None
        self.r: C = None
        self.t: F = None
        self.z: G = None
        self.o: B = None
        self.y: E = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.o: G = None
        self.q: C = None
        self.r: D = None
        self.t: D = None
        self.y: I = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: I = None
        self.z: A = None
        self.v: B = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: C = None
        self.z: I = None
        self.r: G = None
        self.t: G = None
        self.o: A = None
        self.s: I = None
        self.y: E = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.v: D = None
        self.r: C = None
        self.t: F = None
        self.z: G = None
        self.o: B = None
        self.y: E = None
        self.x: C = None
        self.txt = txt

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

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