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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.x: C = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.q: D = None
        self.p: E = None
        self.t: H = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.x: C = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.q: D = None
        self.p: E = None
        self.t: H = None
        self.w: E = None
        self.txt = txt

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

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

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