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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: C = None
        self.x: H = None
        self.s: C = None
        self.u: A = None
        self.z: D = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: H = None
        self.w: B = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.z: D = None
        self.t: B = None
        self.v: F = None
        self.p: D = None
        self.y: B = None
        self.s: B = None
        self.txt = txt

l = A("l")
h = B("h")
a = C("a")
f = D("f")
j = E("j")
m = F("m")
c = G("c")
k = H("k")
g = G("g")

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: C = None
        self.x: H = None
        self.s: C = None
        self.u: A = None
        self.z: D = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: H = None
        self.w: B = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.z: D = None
        self.t: B = None
        self.v: F = None
        self.p: D = None
        self.y: B = None
        self.s: B = None
        self.txt = txt

l = A("l")
h = B("h")
a = C("a")
f = D("f")
j = E("j")
m = F("m")
c = G("c")
k = H("k")
g = G("g")

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