class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: E = None
        self.q: G = None
        self.t: E = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: A = None
        self.r: G = None
        self.z: E = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.s: H = None
        self.r: C = None
        self.p: H = None
        self.w: H = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: A = None
        self.r: G = None
        self.z: E = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.s: H = None
        self.r: C = None
        self.p: H = None
        self.w: H = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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