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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.z: G = None
        self.p: F = None
        self.s: D = None
        self.y: D = None
        self.q: E = None
        self.t: G = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: G = None
        self.u: A = None
        self.t: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.r: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: F = None
        self.u: C = None
        self.y: E = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.z: G = None
        self.p: F = None
        self.s: D = None
        self.y: D = None
        self.q: E = None
        self.t: G = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: G = None
        self.u: A = None
        self.t: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.r: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: F = None
        self.u: C = None
        self.y: E = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

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

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