class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: E = None
        self.v: B = None
        self.y: C = None
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.y: E = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: F = None
        self.o: E = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: D = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.y: E = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: F = None
        self.o: E = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: D = None
        self.u: A = None
        self.txt = txt

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

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