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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: B = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: B = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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