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

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

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

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

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

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

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

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

c = A("c")
a = B("a")
k = C("k")
n = D("n")
j = E("j")
m = F("m")
d = G("d")
e = H("e")
h = H("h")
l = C("l")

c.s = m
a.q = d
k.s = j
k.w = j
k.q = j
k.x = l
k.t = l
k.p = a
k.o = d
k.z = e
n.y = d
n.t = m
j.p = l
j.v = c
j.t = c
j.y = m
j.q = n
m.o = n
m.z = n
m.u = e
d.s = l
d.r = n
d.u = j
d.q = j
e.y = d
e.r = d
e.p = j
e.u = c
e.z = a
e.w = m
h.y = d
h.r = d
h.p = j
h.u = c
h.z = a
h.w = m
l.s = j
l.w = j
l.q = j
l.x = k
l.t = k
l.p = a
l.o = d
l.z = e
assert a.q.s.o.q.q.y.s.q.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

c = A("c")
a = B("a")
k = C("k")
n = D("n")
j = E("j")
m = F("m")
d = G("d")
e = H("e")
h = H("h")
l = C("l")

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