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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: E = None
        self.u: B = None
        self.o: F = None
        self.t: F = None
        self.q: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: D = None
        self.s: B = None
        self.o: A = None
        self.r: C = None
        self.w: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: F = None
        self.o: E = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: E = None
        self.u: B = None
        self.o: F = None
        self.t: F = None
        self.q: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: D = None
        self.s: B = None
        self.o: A = None
        self.r: C = None
        self.w: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: F = None
        self.o: E = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

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