class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: F = None
        self.q: F = None
        self.t: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: F = None
        self.t: G = None
        self.q: C = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: F = None
        self.t: G = None
        self.q: C = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: D = None
        self.txt = txt

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

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

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