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

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

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: B = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: B = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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