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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.p: F = None
        self.x: B = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: B = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.p: F = None
        self.x: B = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: B = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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