class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: H = None
        self.y: B = None
        self.w: D = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: D = None
        self.w: C = None
        self.z: B = None
        self.u: G = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.o: E = None
        self.v: C = None
        self.s: H = None
        self.t: E = None
        self.w: E = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: E = None
        self.v: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: H = None
        self.p: E = None
        self.u: H = None
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: D = None
        self.w: C = None
        self.z: B = None
        self.u: G = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.o: E = None
        self.v: C = None
        self.s: H = None
        self.t: E = None
        self.w: E = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: E = None
        self.v: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: H = None
        self.p: E = None
        self.u: H = None
        self.o: F = None
        self.txt = txt

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

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