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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.s: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: E = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.v: F = None
        self.q: A = None
        self.z: E = None
        self.p: E = None
        self.u: B = None
        self.o: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.s: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: E = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.v: F = None
        self.q: A = None
        self.z: E = None
        self.p: E = None
        self.u: B = None
        self.o: H = None
        self.txt = txt

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

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

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