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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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