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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.q: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.q: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: C = None
        self.u: F = None
        self.txt = txt

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

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