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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.v: H = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: A = None
        self.r: G = None
        self.t: G = None
        self.z: C = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: E = None
        self.u: A = None
        self.o: C = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: F = None
        self.u: G = None
        self.r: G = None
        self.p: D = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

a = A("a")
n = B("n")
f = C("f")
b = D("b")
h = E("h")
g = F("g")
j = G("j")
c = H("c")
l = E("l")

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.v: H = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: A = None
        self.r: G = None
        self.t: G = None
        self.z: C = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: E = None
        self.u: A = None
        self.o: C = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: F = None
        self.u: G = None
        self.r: G = None
        self.p: D = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

a = A("a")
n = B("n")
f = C("f")
b = D("b")
h = E("h")
g = F("g")
j = G("j")
c = H("c")
l = E("l")

a.v = n
a.t = g
n.q = g
n.s = f
n.r = j
f.p = c
f.v = c
f.w = n
f.u = l
f.z = l
b.z = n
b.x = a
h.w = b
h.v = a
h.r = j
h.t = j
h.z = f
h.q = f
g.q = c
g.r = c
g.s = l
g.u = a
g.o = f
g.p = j
j.t = l
c.o = n
c.y = n
c.w = g
c.u = j
c.r = j
c.p = b
c.s = b
l.w = b
l.v = a
l.r = j
l.t = j
l.z = f
l.q = f
assert n.q.r.p.x.t.u.v.txt == "n"