class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: G = None
        self.o: E = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.p: H = None
        self.q: B = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.o: G = None
        self.u: G = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.t: E = None
        self.u: E = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: H = None
        self.p: H = None
        self.q: B = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.o: G = None
        self.u: G = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.t: E = None
        self.u: E = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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