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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: I = None
        self.q: G = None
        self.x: I = None
        self.s: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.txt = txt

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

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

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

i = A("i")
k = B("k")
a = C("a")
d = D("d")
g = E("g")
h = F("h")
m = G("m")
l = H("l")
f = I("f")
j = E("j")

i.w = j
i.y = j
i.q = a
i.v = f
k.w = h
k.t = f
k.x = f
k.q = m
k.s = d
a.u = i
a.w = i
a.o = d
a.t = j
a.x = j
a.y = k
a.v = h
a.p = m
a.r = m
d.u = i
d.p = j
d.t = h
g.z = f
g.o = k
g.v = m
g.s = h
h.q = d
h.r = j
m.q = h
m.s = l
m.w = d
m.y = d
m.z = i
m.v = f
m.x = f
m.u = k
m.r = a
l.x = a
f.w = j
f.u = k
f.x = k
f.r = a
j.z = f
j.o = k
j.v = m
j.s = h
assert l.x.p.w.u.q.o.t.q.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: E = None
        self.q: C = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: I = None
        self.q: G = None
        self.x: I = None
        self.s: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.txt = txt

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

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

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

i = A("i")
k = B("k")
a = C("a")
d = D("d")
g = E("g")
h = F("h")
m = G("m")
l = H("l")
f = I("f")
j = E("j")

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