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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

j = A("j")
m = B("m")
e = C("e")
f = D("f")
b = E("b")
a = F("a")
h = D("h")
g = D("g")
k = E("k")

j.x = a
j.u = e
m.y = e
m.s = j
m.v = a
e.u = m
f.z = g
f.y = e
f.u = e
f.x = k
b.z = m
a.z = m
h.z = g
h.y = e
h.u = e
h.x = k
g.z = f
g.y = e
g.u = e
g.x = b
k.z = m
assert h.x.z.s.u.u.s.u.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

j = A("j")
m = B("m")
e = C("e")
f = D("f")
b = E("b")
a = F("a")
h = D("h")
g = D("g")
k = E("k")

j.x = a
j.u = e
m.y = e
m.s = j
m.v = a
e.u = m
f.z = g
f.y = e
f.u = e
f.x = k
b.z = m
a.z = m
h.z = g
h.y = e
h.u = e
h.x = k
g.z = f
g.y = e
g.u = e
g.x = b
k.z = m
assert h.x.z.s.u.u.s.u.u.s.txt == "j"