class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: D = None
        self.u: B = None
        self.w: A = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.r: B = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: A = None
        self.z: G = None
        self.r: E = None
        self.txt = txt

c = A("c")
j = B("j")
e = C("e")
b = D("b")
m = E("m")
k = F("k")
l = G("l")
f = H("f")

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: D = None
        self.u: B = None
        self.w: A = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.r: B = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: A = None
        self.z: G = None
        self.r: E = None
        self.txt = txt

c = A("c")
j = B("j")
e = C("e")
b = D("b")
m = E("m")
k = F("k")
l = G("l")
f = H("f")

c.z = f
c.p = k
c.x = m
j.s = c
j.x = m
j.z = f
e.r = f
e.s = b
e.u = j
e.y = j
e.w = c
e.v = m
b.o = l
b.p = k
b.r = k
m.s = j
m.q = j
m.z = j
m.p = k
m.t = k
m.u = l
m.v = e
k.s = l
l.q = c
l.y = m
l.r = j
l.s = k
f.x = l
f.z = l
f.q = c
f.r = m
assert l.y.u.y.v.v.v.v.txt == "m"