class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: E = None
        self.p: H = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: G = None
        self.s: B = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: D = None
        self.z: D = None
        self.q: C = None
        self.o: E = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.w: E = None
        self.t: B = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.w: F = None
        self.s: A = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: G = None
        self.s: B = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: D = None
        self.z: D = None
        self.q: C = None
        self.o: E = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.w: E = None
        self.t: B = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.w: F = None
        self.s: A = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: E = None
        self.txt = txt

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

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