class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: H = None
        self.y: B = None
        self.s: F = None
        self.r: H = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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