class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: I = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.z: A = None
        self.u: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: I = None
        self.o: A = None
        self.w: F = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.z: A = None
        self.u: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: I = None
        self.o: A = None
        self.w: F = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: H = None
        self.txt = txt

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

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